jQuery.noConflict(); function changeColInUri(data,colfrom,colto){ var img=new Image(); img.src=data; img.style.visibility="hidden"; document.body.appendChild(img); var canvas=document.createElement("canvas"); canvas.id='canvas'; canvas.width=img.offsetWidth; canvas.height=img.offsetHeight; var ctx=canvas.getContext("2d"); ctx.drawImage(img,0,0); img.parentNode.removeChild(img); if(canvas.width!=0&&canvas!=undefined){ var imageData=ctx.getImageData(0,0,canvas.width,canvas.height); var data=imageData.data; var rgbfrom=hexToRGB(colfrom); var rgbto=hexToRGB(colto); var r,g,b; for(var x=0, len=data.length; x < len; x+=4){ r=data[x]; g=data[x+1]; b=data[x+2]; data[x]=rgbto.r; data[x+1]=rgbto.g; data[x+2]=rgbto.b; } ctx.putImageData(imageData,0,0); } return canvas.toDataURL(); } jQuery(document).ready(function($){ jQuery('#input-dropdown').find('li').each(function(){ var iconsrc=jQuery(this).find('img').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#41A6DF","#ffffff"); jQuery(this).prepend(''); }}); jQuery('.listing-single-cat').find('li').each(function(){ var iconsrc=jQuery(this).find('.base-icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#41A6DF","#ffffff"); jQuery(this).find('.base-icon').attr("src", changecolor); }}); jQuery('.user-portfolio ul.post-socials').find('li').each(function(){ var iconsrc=jQuery(this).find('.icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#ffffff","#41A6DF"); jQuery(this).find('.icon').attr("src", changecolor); }}); jQuery('.blog-social ul.blog-social').find('li').each(function(){ var iconsrc=jQuery(this).find('.icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#ffffff","#41A6DF"); jQuery(this).find('.icon').attr("src", changecolor); }}); jQuery('.user-info ul.social-icons').find('li').each(function(){ var iconsrc=jQuery(this).find('.icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#ffffff","#6e6e6e"); jQuery(this).find('.icon').attr("src", changecolor); }}); jQuery('.popup-post-left-bottom ul.social-icons').find('li').each(function(){ var iconsrc=jQuery(this).find('.icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#ffffff","#6e6e6e"); jQuery(this).find('.icon').attr("src", changecolor); }}); }); var geocoderr; function lpGetGpsLocName(lpcalback){ if(navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(position){ var clat=position.coords.latitude; var clong=position.coords.longitude; jpCodeLatLng(clat,clong, function(citynamevalue){ lpcalback(citynamevalue); }); }); }else{ alert("Geolocation is not supported by this browser."); }} function lpgeocodeinitialize(){ geocoderr=new google.maps.Geocoder(); } function jpCodeLatLng(lat, lng, lpcitycallback){ var geocoder; geocoder=new google.maps.Geocoder(); var latlng=new google.maps.LatLng(lat, lng); geocoder.geocode({'latLng': latlng}, function(results, status){ if(status==google.maps.GeocoderStatus.OK){ if(results[0]){ var add=results[0].formatted_address ; var value=add.split(","); count=value.length; country=value[count-1]; state=value[count-2]; city=value[count-3]; lpcitycallback(city); }else{ console.log("address not found"); }}else{ console.log("Geocoder failed due to: " + status); }} ); /* latlng=new google.maps.LatLng(lat, lng), geocoderrr=new google.maps.Geocoder(); geocoderrr.geocode({'latLng': latlng}, function(results, status){ if(status==google.maps.GeocoderStatus.OK){ console.log(results); if(results[1]){ for (var i=0; i < results.length; i++){ if(results[i].types[0]==="locality"){ var city=results[i].address_components[0].short_name; var state=results[i].address_components[2].short_name; lpcitycallback(city); }} }else{console.log("No reverse geocode results.")}}else{console.log("Geocoder failed: " + status)}});*/ } jQuery(document).ready(function(){ lpgeocodeinitialize(); }); jQuery(document).ready(function(){ jQuery(document).on('click', '.lp-hide-show-price-features', function(){ var $this=jQuery(this); jQuery('.lp-hide-show-price-features').text('View All Features'); if(false==jQuery(this).next().is(':visible')){ jQuery(".lp-hide-show-price-features").removeClass('expanded'); } $this.toggleClass('MoreDetails'); if($this.hasClass('MoreDetails')){ $this.text('Hide All Features'); jQuery(".lp-price-list").fadeIn('400'); }else{ $this.text('View All Features'); jQuery(".lp-price-list").fadeOut('400'); }}); }); jQuery(document).ready(function (){ jQuery('.lp-price-cats-with-icon li input[type=radio]').click(function (){ jQuery('.lp-price-cats-with-icon li input[type=radio]:not(:checked)').parent().removeClass("active-category-radio"); jQuery('.lp-price-cats-with-icon li input[type=radio]:checked').parent().addClass("active-category-radio"); }); }); jQuery(document).ready(function (){ jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]').click(function (){ jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]:not(:checked)').parent().removeClass("active-category-radio-v2"); jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]:checked').parent().addClass("active-category-radio-v2"); }); }); jQuery(document).ready(function (){ jQuery(document).on('click', '.horizontal_view_list li input[type=radio]', function(){ jQuery('.horizontal_view_list li input[type=radio]:not(:checked)').parent('label').removeClass("price_plan_active_disable"); jQuery('.horizontal_view_list li input[type=radio]:checked').parent('label').addClass("price_plan_active_disable"); jQuery('.lp_hori_view_plan_left_section').removeClass('horizontal_choose_button'); jQuery(this).closest('.lp_hori_view_plan_left_section').addClass('horizontal_choose_button'); jQuery(this).closest('.lp-horizontial-specific').addClass('lp-horizontial-specific-height'); }); jQuery(document).on('click', '.lp-standerd-exlusiv button', function(event){ jQuery('.lp-horizontial-specific').removeClass('lp-horizontial-specific-height'); }); jQuery(document).on('click', '.lp_button_switcher span', function(event){ jQuery('.lp-horizontial-specific').removeClass('lp-horizontial-specific-height'); }); jQuery('.horizontal_view_list li:nth(0) input[type=radio]').trigger('click').parent('label').addClass("price_plan_active_disable"); }); jQuery(document).ready(function(){ var x=jQuery('.lp_category_list_slide').children(); for (i=0; i < x.length ; i +=1){ x.slice(i,i+1).wrapAll('
'); } if(jQuery('.lp_category_list_slide').length!=0){ jQuery('.lp_category_list_slide').slick({ slidesToShow: 5, slidesToScroll: 1, prevNext: true, arrows: true, dots: false, responsive: [ { breakpoint: 768, settings: { arrows: true, infinite: false, slidesToShow: 4, slidesToScroll: 1 }}, { breakpoint: 481, settings: { arrows: true, infinite: false, slidesToShow: 3, slidesToScroll: 1 }}, { breakpoint: 390, settings: { arrows: true, infinite: false, slidesToShow: 2, slidesToScroll: 1 }} ] }); }}); /*jQuery(document).ready(function(){ jQuery('.slider_pricing_Plan').slick({ slidesToShow: 3, slidesToScroll: 1, arrows: true, fade: true, dots: true, arrows:true }); });*/ jQuery(document).ready(function(){ jQuery('#category_dropdown').on('select2:select', function (e){ $this=jQuery(this); jQuery("body").addClass("listingpro-loading"); jQuery('#cats-selected-plans').html(''); var templatestyle=jQuery(this).closest('#select_style').data('style'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_term_object.ajaxurl, data: { 'action': 'listingpro_select_plan_by_cat', 'term_id': $this.val(), 'templatestyle': templatestyle, }, success: function(data){ jQuery("body").removeClass("listingpro-loading"); if(data.plans){ jQuery('#cats-selected-plans').html(data.plans); var $hiddenField=''; jQuery($hiddenField).appendTo(".price-plan-button"); }} }); }); }); jQuery(document).ready(function(){ jQuery('.tooltip_price_features span').on('mouseover', function(){ var $this=jQuery(this); $this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","visible"); }); jQuery('.tooltip_price_features span').on('mouseout', function(){ var $this=jQuery(this); $this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","hidden"); }); }); jQuery(document).ready(function(){ jQuery(document).on('mouseover', '.tooltip_price_features span', function(){ var $this=jQuery(this); $this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","visible"); }); jQuery(document).on('mouseout', '.tooltip_price_features span', function(){ var $this=jQuery(this); $this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","hidden"); }); }); jQuery.noConflict(); jQuery(window).on('resize load live', function (){ jQuery(window).resize(function (){ if(jQuery(window).width() <=768){ jQuery('a.open-map-view').on('click', function(event){ event.preventDefault(); jQuery('.sidemap-container').addClass('open-map'); jQuery('header').addClass('map-view-content'); }); jQuery('a.open-img-view').on('click', function(event){ event.preventDefault(); jQuery('.sidemap-container').removeClass('open-map'); jQuery('header').removeClass('map-view-content'); }); if(jQuery('#wpadminbar').length > 0){ jQuery('html body').css('margin-top','-46px'); }}else{ jQuery('.sidemap-container').removeClass('open-map'); if(jQuery('#wpadminbar').length > 0){ jQuery('html body').css('margin-top','0px'); } jQuery('a.open-map-view').on('click', function(event){ event.preventDefault(); jQuery('.sidemap-container').addClass('open-map'); jQuery('header').addClass('map-view-content'); }); jQuery('a.open-img-view').on('click', function(event){ event.preventDefault(); jQuery('.sidemap-container').removeClass('open-map'); jQuery('header').removeClass('map-view-content'); }); } if(jQuery(window).width() <=480){ jQuery('#more_filters').hide(); }else{ jQuery('#more_filters').show(); }}); }); jQuery(document).ready(function(){ jQuery('.lp_cancel_notic').click(function (e){ e.preventDefault(); jQuery('.lp_notification_wrapper').slideToggle(400); }) jQuery('.claimformtrigger2').click(function(){ jQuery('header').addClass('lp-head-zindex'); }) jQuery('.lp-click-zindex').click(function(){ jQuery('header').removeClass('lp-head-zindex'); }); jQuery('.lp-tagline-submit-tagline label input[type="checkbox"]').click(function(event){ if(jQuery(this).prop("checked")==true){ jQuery(".with-title-cond").fadeIn(700); }else if(jQuery(this).prop("checked")==false){ jQuery(".with-title-cond").fadeOut(700); }}); jQuery('.stickynavbar ul li').each(function (e){ var tagetID=jQuery(this).find('a').attr('href'); if(jQuery(tagetID).length==0){ jQuery(this).remove(); }}); var hh=jQuery('header').outerHeight(); var ab=jQuery('.absolute'); ab.css('top', hh); if(jQuery('.chosen-container').length > 0){ jQuery('.chosen-container').on('touchstart', function(e){ e.stopPropagation(); e.preventDefault(); jQuery(this).trigger('mousedown'); }); } jQuery('#see_filter').on('click', function(event){ event.preventDefault(); var filter=jQuery('#more_filters'); jQuery(this).next('#more_filters').toggleClass('open_filter'); if(filter.hasClass('open_filter')){ jQuery(this).next('#more_filters').slideDown(400); }else{ jQuery(this).next('#more_filters').slideUp(400); };}); }); jQuery(document).ready(function($){ var loc=jQuery('.ui-widget').data('option'); var apiType=jQuery('#page').data('ipapi'); var currentlocationswitch='1'; currentlocationswitch=jQuery('#page').data('lpcurrentloconhome'); if(currentlocationswitch=="0"){ loc='locationifoff'; jQuery('.lp-location-search .ui-widget > i').fadeOut('fast'); } if(loc=='yes'){ if(jQuery('.form-group').is('.lp-location-search')||jQuery('.form-group').is('.lp-location-inner-search')){ if(apiType==="geo_ip_db"){ jQuery.getJSON('https://geoip-db.com/json/geoip.php?jsonp=?') .done (function(location){ jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); jQuery('#searchlocation').find('#def_location').text(location.city); jQuery('#searchlocation').find('#def_location').val(location.city); jQuery('#cities').val(location.city); jQuery('input[name=lp_s_loc]').val(location.city); jQuery(".select2-selection__rendered").attr("title",location.city).text(location.city); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }); } else if(apiType==="ip_api"){ jQuery.get("https://ipapi.co/json", function(location){ jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); jQuery('#searchlocation').find('#def_location').text(location.city); jQuery('#searchlocation').find('#def_location').val(location.city); jQuery('#cities').val(location.city); jQuery('input[name=lp_s_loc]').val(location.city); jQuery(".select2-selection__rendered").attr("title",location.city).text(location.city); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }, "json"); }else{ lpGetGpsLocName(function (lpgetcurrentcityvalue){ lpgpsclocation=lpgetcurrentcityvalue; jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); jQuery('#searchlocation').find('#def_location').text(lpgpsclocation); jQuery('#searchlocation').find('#def_location').val(lpgpsclocation); jQuery('#cities').val(lpgpsclocation); jQuery('input[name=lp_s_loc]').val(lpgpsclocation); jQuery(".select2-selection__rendered").attr("title",lpgpsclocation).text(lpgpsclocation); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }); }} }else if(loc=='no'){ jQuery('.lp-location-search .ui-widget > i').on('click', function(event){ event.preventDefault(); jQuery(this).addClass('fa-circle-o-notch fa-spin'); jQuery(this).removeClass('fa-crosshairs'); if(jQuery('.form-group').is('.lp-location-search')){ if(apiType==="geo_ip_db"){ jQuery.getJSON('https://geoip-db.com/json/geoip.php?jsonp=?') .done (function(location){ jQuery('.chosen-single').addClass('remove-margin'); jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); if(location.city==null){ }else{ jQuery('#searchlocation').find('#def_location').text(location.city); jQuery('#searchlocation').find('#def_location').val(location.city); jQuery('#cities').val(location.city); jQuery('input[name=lp_s_loc]').val(location.city); jQuery(".select2-selection__rendered").attr("title",location.city).text(location.city); } jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }); } else if(apiType==="ip_api"){ jQuery.get("https://ipapi.co/json", function(location){ jQuery('.chosen-single').addClass('remove-margin'); jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); if(location.city==null){ }else{ jQuery('#searchlocation').find('#def_location').text(location.city); jQuery('#searchlocation').find('#def_location').val(location.city); jQuery('#cities').val(location.city); jQuery('input[name=lp_s_loc]').val(location.city); } jQuery(".select2-selection__rendered").attr("title",location.city).text(location.city); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }, "json"); }else{ lpGetGpsLocName(function (lpgetcurrentcityvalue){ lpgpsclocation=lpgetcurrentcityvalue; jQuery('.chosen-single').addClass('remove-margin'); jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); jQuery('#searchlocation').find('#def_location').text(lpgpsclocation); jQuery('#searchlocation').find('#def_location').val(lpgpsclocation); jQuery('#cities').val(lpgpsclocation); jQuery('input[name=lp_s_loc]').val(lpgpsclocation); jQuery(".select2-selection__rendered").attr("title",lpgpsclocation).text(lpgpsclocation); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }); }} }); } jQuery('#lp-new-ad-compaignForm').on('submit', function(e){ var $this=jQuery(this); if($this.data('type')=="adsperclick"){ totalPrice=jQuery('input[name="adsprice_pc"]').val(); }else{ totalPrice=jQuery('input[name="ads_price"]').val(); } method=jQuery('input[name="method"]:checked').val(); currency=$this.find('input[name="currency"]').val(); listing_id=jQuery('input[name=lp_ads_for_listing]').val(); listing_name=jQuery('input[name=lp_ads_title]').val(); taxRate=$this.find('input[name="taxprice"]').val(); if(listing_id===''||method===''){ alert(jQuery('input#ad-blank-errorMsg').val()); e.preventDefault(); } else if(method==='stripe'){ if(jQuery("li.taxpricein")[0]){ if(jQuery.trim(totalPrice)==''){}else{ $taxVal=jQuery('li.taxpricein h5 span').text(); $taxVal=parseInt($taxVal); $taxVal=$taxVal/100; $taxVal=$taxVal*totalPrice; $taxVal=$taxVal.toFixed(2); totalPrice=parseFloat($taxVal) + parseFloat(totalPrice); }} totalPrice=parseFloat(totalPrice)*100; totalPrice=parseFloat(totalPrice).toFixed(); handler.open({ name: listing_name, description: "", zipCode: true, amount: totalPrice, currency: currency }); e.preventDefault(); } else if(method==='2checkout'){ var packages=[]; jQuery('input.checked_class[type="checkbox"]:checked').each(function (){ packages.push($this.data('package')); }); jQuery('#myCCForm #tprice').val(totalPrice); jQuery('#myCCForm #listing_id_2check').val(listing_id); jQuery('#myCCForm #packages').val(packages); jQuery('#myCCForm #taxprice').val($this.find('input[name="taxprice"]').val()); jQuery("button.lp-2checkout-modal2").trigger('click'); e.preventDefault(); }}); }); jQuery(window).load(function(){ jQuery('.lp-suggested-search').on('click', function(event){ jQuery("#input-dropdown").niceScroll({ cursorcolor:"#363F48", cursoropacitymax: 1, boxzoom:false, cursorwidth: "10px", cursorborderradius: "0px", cursorborder: "0px solid #fff", touchbehavior:true, preventmultitouchscrolling: false, cursordragontouch: true, background: "#f7f7f7", horizrailenabled: false, autohidemode: false, zindex:"999999", }); }); jQuery('.notice a.close').on('click', function(event){ event.preventDefault(); jQuery(this).parent('.notice').fadeOut('slow'); }); jQuery('.lp-header-full-width .lp-menu-bar .header-filter, .lp-menu-bar .header-filter.pos-relative.form-group').css('display', 'block'); var logoH=jQuery('.lp-logo').outerHeight(); var acHgt=jQuery('.header-right-panel.clearfix'); var a=parseInt(logoH + 10); var b=jQuery('.header-right-panel').height(); var c=a - b; var d=c/2; acHgt.css({ 'padding-top': d+'px' }); jQuery('.rating-symbol:nth-child(1)').hover(function(){ jQuery('.review.angry').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.angry').css({ 'opacity': '0', 'visibility': 'hidden', }); }); jQuery('.rating-symbol:nth-child(2)').hover(function(){ jQuery('.review.cry').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.cry').css({ 'opacity': '0', 'visibility': 'hidden', }); }); jQuery('.rating-symbol:nth-child(3)').hover(function(){ jQuery('.review.sleeping').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.sleeping').css({ 'opacity': '0', 'visibility': 'hidden', }); }); jQuery('.rating-symbol:nth-child(4)').hover(function(){ jQuery('.review.smily').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.smily').css({ 'opacity': '0', 'visibility': 'hidden', }); }); jQuery('.rating-symbol:nth-child(5)').hover(function(){ jQuery('.review.cool').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.cool').css({ 'opacity': '0', 'visibility': 'hidden', }); }); var rtngSym=jQuery('.rating-symbol'); var rtngTip=jQuery('input.rating-tooltip'); jQuery('.rating-symbol:first-of-type').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#de9147'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); jQuery('.rating-symbol:nth-of-type(2)').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#de9147'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(2) .rating-symbol-foreground span').css('color', '#de9147'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); jQuery('.rating-symbol:nth-of-type(3)').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#dec435'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(2) .rating-symbol-foreground span').css('color', '#dec435'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(3) .rating-symbol-foreground span').css('color', '#dec435'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); jQuery('.rating-symbol:nth-of-type(4)').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#c5de35'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(2) .rating-symbol-foreground span').css('color', '#c5de35'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(3) .rating-symbol-foreground span').css('color', '#c5de35'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(4) .rating-symbol-foreground span').css('color', '#c5de35'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); jQuery('.rating-symbol:nth-of-type(5)').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#73cf42'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(2) .rating-symbol-foreground span').css('color', '#73cf42'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(3) .rating-symbol-foreground span').css('color', '#73cf42'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(4) .rating-symbol-foreground span').css('color', '#73cf42'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(5) .rating-symbol-foreground span').css('color', '#73cf42'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); rtngSym.on('click', function(event){ event.preventDefault(); var thsVal=jQuery('input.rating-tooltip').val(); if(thsVal==1){ jQuery('.review.angry').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('angry'); jQuery('.rating-symbol').removeClass('cry'); jQuery('.rating-symbol').removeClass('sleeping'); jQuery('.rating-symbol').removeClass('smily'); jQuery('.rating-symbol').removeClass('cool'); }else{ jQuery('.review.angry').removeClass('visible'); }; if(thsVal==2){ jQuery('.review.cry').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('cry'); jQuery('.rating-symbol:nth-of-type(2)').addClass('cry'); jQuery('.rating-symbol').removeClass('angry'); jQuery('.rating-symbol').removeClass('sleeping'); jQuery('.rating-symbol').removeClass('smily'); jQuery('.rating-symbol').removeClass('cool'); }else{ jQuery('.review.cry').removeClass('visible'); }; if(thsVal==3){ jQuery('.review.sleeping').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('sleeping'); jQuery('.rating-symbol:nth-of-type(2)').addClass('sleeping'); jQuery('.rating-symbol:nth-of-type(3)').addClass('sleeping'); jQuery('.rating-symbol').removeClass('angry'); jQuery('.rating-symbol').removeClass('cry'); jQuery('.rating-symbol').removeClass('smily'); jQuery('.rating-symbol').removeClass('cool'); }else{ jQuery('.review.sleeping').removeClass('visible'); }; if(thsVal==4){ jQuery('.review.smily').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('smily'); jQuery('.rating-symbol:nth-of-type(2)').addClass('smily'); jQuery('.rating-symbol:nth-of-type(3)').addClass('smily'); jQuery('.rating-symbol:nth-of-type(4)').addClass('smily'); jQuery('.rating-symbol').removeClass('angry'); jQuery('.rating-symbol').removeClass('cry'); jQuery('.rating-symbol').removeClass('sleeping'); jQuery('.rating-symbol').removeClass('cool'); }else{ jQuery('.review.smily').removeClass('visible'); }; if(thsVal==5){ jQuery('.review.cool').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('cool'); jQuery('.rating-symbol:nth-of-type(2)').addClass('cool'); jQuery('.rating-symbol:nth-of-type(3)').addClass('cool'); jQuery('.rating-symbol:nth-of-type(4)').addClass('cool'); jQuery('.rating-symbol:nth-of-type(5)').addClass('cool'); jQuery('.rating-symbol').removeClass('angry'); jQuery('.rating-symbol').removeClass('cry'); jQuery('.rating-symbol').removeClass('sleeping'); jQuery('.rating-symbol').removeClass('smily'); }else{ jQuery('.review.cool').removeClass('visible'); }; var CheckMultiRatingState=jQuery('#rewies_form').data('multi-rating'); var ratingSumTotal=0; if(CheckMultiRatingState==1){ var activeRatingLength=jQuery('.lp-multi-rating-val').length; jQuery('.lp-multi-rating-val').each(function (index){ ratingSumTotal +=Number(jQuery(this).val()); }) var activeRatingClass=Math.round(ratingSumTotal/activeRatingLength); jQuery('.lp-review-stars').removeClass(function (index, css){ return (css.match (/\bactive-rating-avg\S+/g)||[]).join(' '); }); jQuery('.lp-review-stars').addClass('active-rating-avg'+activeRatingClass); jQuery('.lp-review-stars i.fa:nth-child('+ Number(activeRatingClass+1) +')').removeClass('fa-star-o').addClass('fa-star'); jQuery('.lp-review-stars i.fa:nth-child('+ Number(activeRatingClass+1) +')').prevAll('.fa-star-o').removeClass('fa-star-o').addClass('fa-star'); jQuery('.lp-review-stars i.fa:nth-child('+ Number(activeRatingClass+1) +')').nextAll('.fa-star').removeClass('fa-star-o').addClass('fa-star-o'); }}); }); jQuery(document).ready(function(){ 'use-strict'; var checkdInput=jQuery('.checkboxx input.checked_class'); checkdInput.on('change', function(event){ event.preventDefault(); if(checkdInput.is(':checked')){ jQuery('a#lp-next').css('display', 'block'); jQuery('a#lp-next').removeClass('hide'); jQuery('span.show').removeClass('show'); jQuery('.promotional-section > .lp-face.lp-pay-options.lp-dash-sec > span').addClass('hide'); }else{ jQuery('a#lp-next').addClass('hide'); jQuery('.promotional-section > .lp-face.lp-pay-options.lp-dash-sec > span').addClass('show'); };}); var rdoInput=jQuery('.lp-method-wrap input.radio_checked'); rdoInput.on('change', function(event){ event.preventDefault(); if(rdoInput.is(':checked')){ jQuery('input.lp-next2.promotebtn').css('display', 'block'); jQuery('input.lp-next2.promotebtn').removeClass('hide'); jQuery('.promotional-section span.proceed-btn').removeClass('show'); jQuery('.promotional-section span.proceed-btn').addClass('hide'); }else{ jQuery('input.lp-next2.promotebtn').addClass('hide'); jQuery('.promotional-section span.proceed-btn').addClass('show'); };}); jQuery('.promotional-section a.lp-submit-btn').on('click', function(event){ event.preventDefault(); jQuery(this).parent('.promotional-section').slideUp(500); jQuery(this).parent('.promotional-section').next('.lp-card > form#ads_promotion').slideDown(1000); }); var dash=jQuery('.dashboard-tabs.lp-main-tabs.text-center > ul > li.dropdown > a'); var dashli=jQuery('.dashboard-tabs.lp-main-tabs.text-center > ul > li.dropdown'); var dashul=jQuery('.dashboard-tabs.lp-main-tabs.text-center > ul > li.dropdown > ul'); dash.on('click', function(event){ event.preventDefault(); if(dashli.hasClass('opened')){ jQuery(dashli).removeClass('opened'); jQuery(dashul).removeClass('opened'); jQuery(this).parent('li').addClass('opened'); jQuery(this).next('ul').addClass('opened'); }else{ jQuery(dashul).removeClass('opened'); jQuery(dashli).removeClass('opened'); jQuery(this).parent('li').addClass('opened'); jQuery(this).next('ul').addClass('opened'); };}); jQuery('h3#reply-title').on('click', function(event){ event.preventDefault(); var thiss=jQuery(this); if(thiss.hasClass('active')){ jQuery(this).removeClass('active'); jQuery(this).next('#rewies_form').slideUp(); jQuery(this).next('#rewies_formm').slideUp(); }else{ jQuery(this).addClass('active'); jQuery(this).next('#rewies_form').slideDown(); jQuery(this).next('#rewies_formm').slideDown(); };}); jQuery('#clicktoreview').on('click', function(event){ event.preventDefault(); var thiss=jQuery('#reply-title'); thiss.addClass('active'); thiss.next('#rewies_form').slideDown(); thiss.next('#rewies_formm').slideDown(); jQuery('html, body').animate({ scrollTop: jQuery('#reply-title').offset().top }, 2000); }); jQuery('.leadformtrigger').on('click', function(e){ e.preventDefault(); jQuery('.app-view-lead-form').slideToggle(500); }); jQuery('.open-lead-form-app-view').on('click', function(e){ if(jQuery('.app-view-lead-form')[0]){ jQuery('.app-view-lead-form').slideToggle(500); jQuery('html, body').animate({ scrollTop: jQuery('.leadformtrigger').offset().top }, 2000); }}) jQuery('#rewies_form input[type=file]').change(function(e){ $in=jQuery(this); $in.prev().prev().text($in.val()); }); jQuery('a.grid').on('click', function(event){ event.preventDefault(); jQuery('a.list').removeClass('active'); jQuery(this).addClass('active'); jQuery('.listing-simple').removeClass('listing_list_view'); if(jQuery('#list-grid-view-v2').length!=0&&jQuery('#list-grid-view-v2').hasClass('swtch-ll')){ jQuery('#list-grid-view-v2').attr('data-layout-class', 'grid'); } if(jQuery('#content-grids').hasClass('v2-toggle')){ jQuery('.loop-switch-class').removeClass('col-md-12'); jQuery('.loop-switch-class').addClass('col-md-6'); jQuery('.lp-listings.active-view').removeClass('list-style'); jQuery('.lp-listings.active-view').addClass('grid-style'); }else{ jQuery('.post-with-map-container').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-sm-12 list_view'); jQuery('.post-with-map-container').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-md-6 col-sm-12 grid_view2'); if(jQuery('#content-grids').hasClass('listing-with-header-filters-wrap')){ jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-sm-12 list_view'); jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-md-6 col-sm-12 grid_view2'); }else{ jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-sm-12 list_view'); jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-md-4 col-sm-12 grid_view2'); } jQuery('.listing-with-sidebar').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-sm-12 list_view'); jQuery('.listing-with-sidebar').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-md-6 col-sm-12 grid_view2'); }}); jQuery('a.list').on('click', function(event){ event.preventDefault(); jQuery('a.grid').removeClass('active'); jQuery(this).addClass('active'); jQuery('.listing-simple').addClass('listing_list_view'); if(jQuery('#list-grid-view-v2').length!=0&&jQuery('#list-grid-view-v2').hasClass('swtch-ll')){ jQuery('#list-grid-view-v2').attr('data-layout-class', 'list'); } if(jQuery('#content-grids').hasClass('v2-toggle')){ jQuery('.loop-switch-class').removeClass('col-md-6'); jQuery('.loop-switch-class').addClass('col-md-12'); jQuery('.lp-listings.active-view').addClass('list-style'); jQuery('.lp-listings.active-view').removeClass('grid-style'); }else{ jQuery('.post-with-map-container').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-md-6 col-sm-6 grid_view2'); jQuery('.post-with-map-container').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-sm-12 list_view'); if(jQuery('#content-grids').hasClass('listing-with-header-filters-wrap')){ jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-md-6 col-sm-6 grid_view2'); jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-sm-12 list_view'); }else{ jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-md-4 col-sm-6 grid_view2'); jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-sm-12 list_view'); } jQuery('.listing-with-sidebar').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-md-6 col-sm-6 grid_view3'); jQuery('.listing-with-sidebar').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-sm-12 list_view'); }}); jQuery('a.show-all-timings').on('click', function(event){ event.preventDefault(); jQuery(this).toggleClass('opened'); jQuery(this).next('ul.hidding-timings').slideToggle(400); }); jQuery(".detail-page2-tab-content .review-form h3").removeAttr("id"); jQuery('.listing-app-view .listing-app-view-bar .pricy-form-group #lp-find-near-me-outer ul > li > a').click(function(){ jQuery(this).toggleClass('margin-right-0 lp-remove-border'); }); var inputs=document.querySelectorAll('.inputfile'); Array.prototype.forEach.call(inputs, function(input){ var label=input.nextElementSibling, labelVal=label.innerHTML; input.addEventListener('change', function(e){ var fileName=''; if(this.files&&this.files.length > 1) fileName=(this.getAttribute('data-multiple-caption')||'').replace('{count}', this.files.length); else fileName=e.target.value.split('\\').pop(); if(fileName) label.querySelector('span').innerHTML=fileName; else label.innerHTML=labelVal; }); input.addEventListener('focus', function(){ input.classList.add('has-focus'); }); input.addEventListener('blur', function(){ input.classList.remove('has-focus'); }); }); if(jQuery('body').hasClass('home')||jQuery('body').hasClass('app-view-home')){ jQuery('.listing-app-view.home .map-view-list-container2,.listing-app-view.app-view-home .map-view-list-container2').slick({ centerMode: false, centerPadding: '0px', infinite: true, accesibility: false, draggable: true, swipe: true, touchMove: false, autoplaySpeed: 1400, speed: 100, slidesToShow: 2, dots: true, arrows: false }); jQuery('.listing-app-view.home .lp-location-slider,.listing-app-view.app-view-home .lp-location-slider').slick({ centerMode: false, centerPadding: '0px', infinite: true, accesibility: false, draggable: true, swipe: true, touchMove: false, autoplaySpeed: 1400, speed: 100, slidesToShow: 3, dots: true, arrows: false }); } if(jQuery('.listing-category-slider4').length > 0){ jQuery('.listing-category-slider4').slick({ centerMode: false, centerPadding: '0px', infinite: true, accesibility: false, draggable: true, swipe: true, touchMove: false, autoplaySpeed: 1400, speed: 100, slidesToShow: 4, dots: false, arrows: true, responsive: [ { breakpoint: 768, settings: { arrows: false, centerMode: false, centerPadding: '0px', slidesToShow: 4 }}, { breakpoint: 480, settings: { arrows: false, centerMode: false, centerPadding: '0px', slidesToShow: 1 }} ] }); } jQuery('#map-view-icon2').click(function (){ jQuery("#search-filter-attr-filter").animate({width: "toggle"}, 5); }); jQuery("#app-view-login-popup .signUpClick").on('click' , function(){ jQuery('.signInClick').removeClass('active'); jQuery('.siginincontainer2').hide(); jQuery('.forgetpasswordcontainer2').hide(); jQuery('.siginupcontainer2').fadeIn(); jQuery(this).addClass('active'); }); jQuery("#app-view-login-popup .signInClick").on('click' , function(){ jQuery('.signUpClick').removeClass('active'); jQuery(this).addClass('active'); jQuery('.forgetpasswordcontainer2').hide(); jQuery('.siginupcontainer2').hide(); jQuery('.siginincontainer2').fadeIn(); }); jQuery("#app-view-login-popup .forgetPasswordClick").on('click' , function(){ jQuery('.siginupcontainer2').hide(); jQuery('.siginincontainer2').hide(); jQuery('.forgetpasswordcontainer2').fadeIn(); }); jQuery("#app-view-login-popup .cancelClick").on('click' , function(){ jQuery('.siginupcontainer2').hide(); jQuery('.forgetpasswordcontainer2').hide(); jQuery('.siginincontainer2').fadeIn(); }); jQuery('.listing-app-view .lp-search-toggle .user-menu').click(function(e){ jQuery(".lp-user-menu").toggleClass("main"); }); jQuery(document).mouseup(function(e){ var container=jQuery(".lp-user-menu"); if(!container.is(e.target)&&container.has(e.target).length===0){ jQuery('.lp-user-menu').removeClass('main'); }}); jQuery('.lp-detail-page-template-3 #clicktoreview2').on('click', function(event){ event.preventDefault(); jQuery(".single-tabber2 ul li").removeClass('active'); jQuery(".detail-page2-tab-content .tab-content .tab-pane").removeClass('active'); jQuery('.single-tabber2 ul .lpreviews').addClass('active'); jQuery('.detail-page2-tab-content .tab-content .lpreviews').addClass('active'); }); jQuery('[data-toggle="tooltip"]').tooltip(); jQuery('a.see_more_btn').on('click', function(event){ event.preventDefault(); var $this=jQuery(this); if($this.hasClass('closedd')){ $this.removeClass('closedd'); $this.addClass('openedd'); jQuery(this).find('i').removeClass('fa-arrow-down'); jQuery(this).find('i').addClass('fa-arrow-up'); }else{ $this.removeClass('openedd'); $this.addClass('closedd'); jQuery(this).find('i').removeClass('fa-arrow-up'); jQuery(this).find('i').addClass('fa-arrow-down'); } jQuery(this).next('.review-content').slideToggle(200); }); jQuery('a.open-reply').on('click', function(event){ event.preventDefault(); var $this=jQuery(this); if($this.hasClass('closeddd')){ $this.removeClass('closeddd'); $this.addClass('openeddd'); jQuery(this).find('i').removeClass('fa-arrow-down'); jQuery(this).find('i').addClass('fa-arrow-up'); }else{ $this.removeClass('openeddd'); $this.addClass('closeddd'); jQuery(this).find('i').removeClass('fa-arrow-up'); jQuery(this).find('i').addClass('fa-arrow-down'); } jQuery(this).next('.post_response').slideToggle(200); }); jQuery('button.add-hours').on('click', function(event){ event.preventDefault(); var $this=jQuery(this); var lp2times=$this.closest('#day-hours-BusinessHours').data('lpenabletwotimes'); var error=false; var fullday=''; var fullhoursclass=''; var lpdash="~"; if(lp2times=="disable"){ var weekday=jQuery('select.weekday').val(); if(jQuery(".fulldayopen").is(":checked")){ jQuery('.fulldayopen').attr('checked', false); jQuery('select.hours-start').prop("disabled", false); jQuery('select.hours-end').prop("disabled", false); var startVal=''; var endVal=''; var hrstart=''; var hrend=''; fullday=$this.data('fullday'); fullhoursclass='fullhours'; lpdash=""; }else{ var startVal=jQuery('select.hours-start').val(); var endVal=jQuery('select.hours-end').val(); var hrstart=jQuery('select.hours-start').find('option:selected').val(); var hrend=jQuery('select.hours-end').find('option:selected').val(); var startVal_digit=hrstart.replace(':', ''); var endVal_digit=hrend.replace(':', ''); if(startVal_digit.indexOf('am') > -1){ startVal_digit=startVal_digit.replace('am', ''); } else if(startVal_digit.indexOf('pm') > -1){ startVal_digit=startVal_digit.replace('pm', ''); if(startVal_digit!='1200'&&startVal_digit!='1230'){ startVal_digit=parseInt(startVal_digit) + 1200; }} if(endVal_digit.indexOf('am') > -1){ endVal_digit=endVal_digit.replace('am', ''); endVal_digit=parseInt(endVal_digit); if(endVal_digit >=1200){ endVal_digit=parseInt(endVal_digit) - 1200; }} else if(endVal_digit.indexOf('pm') > -1){ endVal_digit=endVal_digit.replace('pm', ''); endVal_digit=parseInt(endVal_digit) + 1200; } if(startVal_digit > endVal_digit){ nextWeekday=jQuery("select.weekday option:selected+option").val(); if(typeof nextWeekday==="undefined"){ nextWeekday=jQuery("select.weekday").find("option:first-child").val(); } weekday=weekday+"~"+nextWeekday; }} var sorryMsg=jQuery(this).data('sorrymsg'); var alreadyadded=jQuery(this).data('alreadyadded'); if($this.hasClass('lp-add-hours-st')){ var remove=''; }else{ var remove=jQuery(this).data('remove'); } jQuery('.hours-display .hours').each(function(index, element){ var weekdayTExt=jQuery(element).children('.weekday').text(); if(weekdayTExt==weekday){ alert(sorryMsg+'! '+weekday+' '+alreadyadded); error=true; }}); if(error!=true){ jQuery('.hours-display').append("
"+ weekday +""+fullday+""+ hrstart +""+lpdash+""+ hrend +""+remove+"
"); var current=jQuery('select.weekday').find('option:selected'); var nextval=current.next(); current.removeAttr('selected'); nextval.attr('selected','selected'); jQuery('select.weekday').trigger('change.select2'); }}else{ var lptwentlyfourisopen=''; var weekday=jQuery('select.weekday').val(); var weekday1=weekday; var weekday2=weekday; if(jQuery(".fulldayopen").is(":checked")){ lptwentlyfourisopen='yes'; jQuery('.fulldayopen').attr('checked', false); jQuery('select.hours-start').prop("disabled", false); jQuery('select.hours-end').prop("disabled", false); jQuery('select.hours-start2').prop("disabled", false); jQuery('select.hours-end2').prop("disabled", false); var startVal1=''; var endVal1=''; var hrstart1=''; var hrend1=''; var startVal2=''; var endVal2=''; var hrstart2=''; var hrend2=''; fullday=$this.data('fullday'); fullhoursclass='fullhours'; lpdash=""; }else{ var startVal1=jQuery('select.hours-start').val(); var endVal1=jQuery('select.hours-end').val(); var hrstart1=jQuery('select.hours-start').find('option:selected').val(); var hrend1=jQuery('select.hours-end').find('option:selected').val(); var startVal1_digit=hrstart1.replace(':', ''); var endVal1_digit=hrend1.replace(':', ''); if(startVal1_digit.indexOf('am') > -1){ startVal1_digit=startVal1_digit.replace('am', ''); } else if(startVal1_digit.indexOf('pm') > -1){ startVal1_digit=startVal1_digit.replace('pm', ''); if(startVal1_digit!='1200'&&startVal1_digit!='1230'){ startVal1_digit=parseInt(startVal1_digit) + 1200; }} if(endVal1_digit.indexOf('am') > -1){ endVal1_digit=endVal1_digit.replace('am', ''); endVal1_digit=parseInt(endVal1_digit); if(endVal1_digit >=1200){ endVal1_digit=parseInt(endVal1_digit) - 1200; }} else if(endVal1_digit.indexOf('pm') > -1){ endVal1_digit=endVal1_digit.replace('pm', ''); endVal1_digit=parseInt(endVal1_digit) + 1200; } if(startVal1_digit > endVal1_digit){ nextWeekday=jQuery("select.weekday option:selected+option").val(); if(typeof nextWeekday==="undefined"){ nextWeekday=jQuery("select.weekday").find("option:first-child").val(); } weekday1=weekday+"~"+nextWeekday; } var startVal2=jQuery('select.hours-start2').val(); var endVal2=jQuery('select.hours-end2').val(); var hrstart2=jQuery('select.hours-start2').find('option:selected').text(); var hrend2=jQuery('select.hours-end2').find('option:selected').text(); var startVal2_digit=hrstart2.replace(':', ''); var endVal2_digit=hrend2.replace(':', ''); if(startVal2_digit.indexOf('am') > -1){ startVal2_digit=startVal2_digit.replace('am', ''); } else if(startVal2_digit.indexOf('pm') > -1){ startVal2_digit=startVal2_digit.replace('pm', ''); if(startVal2_digit!='1200'&&startVal2_digit!='1230'){ startVal2_digit=parseInt(startVal2_digit) + 1200; }} if(endVal2_digit.indexOf('am') > -1){ endVal2_digit=endVal2_digit.replace('am', ''); endVal2_digit=parseInt(endVal2_digit); if(endVal2_digit >=1200){ endVal2_digit=parseInt(endVal2_digit) - 1200; }} else if(endVal2_digit.indexOf('pm') > -1){ endVal2_digit=endVal2_digit.replace('pm', ''); endVal2_digit=parseInt(endVal2_digit) + 1200; } if(startVal2_digit > endVal2_digit){ nextWeekday=jQuery("select.weekday option:selected+option").val(); if(typeof nextWeekday==="undefined"){ nextWeekday=jQuery("select.weekday").find("option:first-child").val(); } weekday2=weekday+"~"+nextWeekday; }} var sorryMsg=jQuery(this).data('sorrymsg'); var alreadyadded=jQuery(this).data('alreadyadded'); if($this.hasClass('lp-add-hours-st')){ var remove=''; }else{ var remove=jQuery(this).data('remove'); } jQuery('.hours-display .hours').each(function(index, element){ var weekdayTExt=jQuery(element).children('.weekday').text(); if(weekdayTExt==weekday){ alert(sorryMsg+'! '+weekday+' '+alreadyadded); error=true; }}); if(error!=true){ if((jQuery(".lp-check-doubletime .enable2ndday").is(":checked"))&&(lptwentlyfourisopen==="")){ jQuery('.hours-display').append("
"+ weekday +""+fullday+""+ hrstart1 +""+lpdash+""+ hrend1 +""+remove+"
 "+ hrstart2 +""+lpdash+""+ hrend2 +"
"); }else{ jQuery('.hours-display').append("
"+ weekday1 +""+fullday+""+ hrstart1 +""+lpdash+""+ hrend1 +""+remove+"
"); } var current=jQuery('select.weekday').find('option:selected'); var nextval=current.next(); current.removeAttr('selected'); nextval.attr('selected','selected'); jQuery('select.weekday').trigger('change.select2'); } }}); jQuery(document).ready(function(){ jQuery('select.hours-start2').prop("disabled", true); jQuery('select.hours-end2').prop("disabled", true); jQuery(".lp-check-doubletime .enable2ndday").change(function(){ if(this.checked){ jQuery('select.hours-start2').prop("disabled", false); jQuery('select.hours-end2').prop("disabled", false); jQuery('.hours-select.lp-slot2-time').slideToggle(300); }else{ jQuery('select.hours-start2').prop("disabled", true); jQuery('select.hours-end2').prop("disabled", true); jQuery('.hours-select.lp-slot2-time').slideToggle(300); }}); }); jQuery(document).on('click','a.remove-hours',function(event){ event.preventDefault(); jQuery(this).parent('.hours').remove(); }); jQuery('a.toggle-currencey-area').on('click', function(event){ event.preventDefault(); jQuery(this).next('.currency-area').slideToggle(400); jQuery(this).toggleClass('active'); }); jQuery('.review-img-slider').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] }, image: { tError: 'The image #%curr% could not be loaded.', titleSrc: function(item){ return item.el.attr('title') + 'by Listingpro team'; }} }); jQuery(document).ready(function(){ jQuery(".fulldayopen").change(function(){ if(this.checked){ jQuery('select.hours-start').prop("disabled", true); jQuery('select.hours-end').prop("disabled", true); jQuery('select.hours-start2').prop("disabled", true); jQuery('select.hours-end2').prop("disabled", true); }else{ jQuery('select.hours-start').prop("disabled", false); jQuery('select.hours-end').prop("disabled", false); jQuery('select.hours-start2').prop("disabled", false); jQuery('select.hours-end2').prop("disabled", false); }}); }); jQuery(document).ready(function(){ jQuery(".add-more").click(function(){ jQuery("#lp_feature_panel").slideToggle("slow"); }); }); var hdrHeight=jQuery('header.header-normal').outerHeight(); jQuery('.top-section .absolute').css('top', hdrHeight); if(jQuery('body').is('.single-listing')){ if(jQuery(window).width() >=768){ jQuery("a[rel^='prettyPhoto']").prettyPhoto({ animation_speed:'fast', theme:'dark_rounded', slideshow:7000, autoplay_slideshow: true, social_tools: '', deeplinking: false, show_title: false, }); }else{ jQuery("a[rel^='prettyPhoto']").on('click', function(event){ event.preventDefault(); }); }} jQuery('a.onlineform').on('click', function(event){ event.preventDefault(); jQuery(this).next('.booking-form').slideToggle(400); jQuery(this).toggleClass('active'); }); jQuery('.listing-second-view .ask-question-area > a.ask_question_popup').on('click', function(event){ event.preventDefault(); jQuery(this).next('.faq-form').slideToggle(400); }); if(jQuery('body').is('.single-listing')){ var sliderstyle=jQuery('body').data('sliderstyle'); if(sliderstyle=="style1"){ var images=jQuery(".listing-slide").data('images-num'); var center_mode=true; if(images > 5){ images=5; center_mode=true; }else{ center_mode=false; } jQuery('.listing-slide').slick({ centerPadding: '10px', slidesToShow: images, autoplay: true, draggable: false, autoplaySpeed: 5000, centerMode: center_mode, focusOnSelect: true, arrows: true, responsive: [ { breakpoint: 768, settings: { arrows: false, centerMode: false, centerPadding: '0px', slidesToShow: 5 }}, { breakpoint: 480, settings: { arrows: true, centerMode: false, centerPadding: '0px', slidesToShow: 1 }} ] }); } else if(sliderstyle=="style2"){ var images=jQuery(".listing-slide").data('images-num'); var center_mode=true; var variable=true; if(images > 3){ center_mode=false; }else if(images=3){ jQuery('.single-page-slider-container').addClass('three-imgs'); variable=false; }else if(images=2){ jQuery('.single-page-slider-container').addClass('new-cls'); }else if(images=1){ jQuery('.single-page-slider-container').addClass('one-img'); }else{ center_mode=false; variable=false; } jQuery('.listing-slide').slick({ slidesToShow: 2, autoplay: true, draggable: false, autoplaySpeed: 5000, centerMode: true, focusOnSelect: true, variableWidth: variable, adaptiveHeight: true, responsive: [ { breakpoint: 768, settings: { arrows: true, centerMode: false, centerPadding: '0px', }}, { breakpoint: 480, settings: { arrows: true, centerMode: false, centerPadding: '0px', slidesToShow: 1 }} ] }); }} if(jQuery('.listing-slide2').length!=0){ jQuery('.listing-slide2').slick({ slidesToShow: 1, autoplay: false, draggable: false, autoplaySpeed: 5000, centerMode: true, centerPadding: '0px', focusOnSelect: true, variableWidth: variable, adaptiveHeight: true, responsive: [ { breakpoint: 768, settings: { arrows: true, centerMode: false, centerPadding: '0px', }}, { breakpoint: 480, settings: { arrows: false, centerMode: false, centerPadding: '0px', slidesToShow: 1 }} ] }) } jQuery(".select2").select2(); if(jQuery('body').is('.single-listing')){ jQuery('.review-img-slider').slick({ infinite: true, slidesToShow: 3, slidesToScroll: 1, autoplay: false, autoplaySpeed: 5000, arrows:true, dots:false, responsive: [ { breakpoint: 790, settings: { arrows: false, centerMode: true, centerPadding: '40px', slidesToShow: 2 }}, { breakpoint: 480, settings: { slidesToShow: 1 }} ] }); jQuery('.post-slide').slick({ infinite: true, slidesToShow: 2, slidesToScroll: 1, arrows:false, dots:true, responsive: [ { breakpoint: 2, settings: { arrows: false, centerMode: true, centerPadding: '40px', slidesToShow: 3 }}, { breakpoint: 480, settings: { slidesToShow: 1 }} ] }); jQuery('.testimonial-slider').slick({ dots: true, infinite: true, autoplay: true, autoplaySpeed: 1000, speed: 1000, arrows: false, slidesToShow: 1 }); } var icons={ header: "fa fa-plus", activeHeader: "fa fa-minus" }; jQuery("#accordion").accordion({ icons: icons, heightStyle: "content", }); jQuery("#toggle").button().on('click',function(){ if(jQuery("#accordion").accordion("option", "icons")){ jQuery("#accordion").accordion("option", "icons", null); }else{ jQuery("#accordion").accordion("option", "icons", icons); }}); jQuery('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ disableOn: 319, type: 'iframe', iframe: { markup: '
'+ '
'+ ''+ '
', patterns: { youtube: { index: 'youtube.com/', id: 'v=', src: '//www.youtube.com/embed/%id%?rel=0&autoplay=1' }}, srcAction: 'iframe_src', }, mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); jQuery('.popup-gallery').magnificPopup({ delegate: '.image-popup', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] }}); jQuery('input.check').on('change', function (){ alert('Rating: ' + jQuery(this).val()); }); if(jQuery('body').is('.single-listing')){ jQuery('#programmatically-set').on('click' , function (){ jQuery('#programmatically-rating').rating('rate', jQuery('#programmatically-value').val()); }); jQuery('#programmatically-get').on('click' , function (){ alert(jQuery('#programmatically-rating').rating('rate')); }); jQuery('.rating-tooltip-manual').rating({ extendSymbol: function (){ var title; jQuery(this).tooltip({ container: 'body', placement: 'bottom', trigger: 'manual', title: function (){ return title; }}); jQuery(this).on('rating.rateenter', function (e, rate){ title=rate; jQuery(this).tooltip('show'); }) .on('rating.rateleave', function (){ jQuery(this).tooltip('hide'); }); }}); jQuery('.rating').each(function (){ jQuery('') .text(jQuery(this).val()||' ') .insertAfter(this); }); jQuery('.rating').on('change', function (){ jQuery(this).next('.label').text(jQuery(this).val()); }); } jQuery(".signUpClick").on('click' , function(){ jQuery('.signInClick').removeClass('active'); jQuery(this).addClass('active'); jQuery('.siginincontainer').fadeOut(); jQuery('.forgetpasswordcontainer').fadeOut(); jQuery('.siginupcontainer').fadeIn(); }); jQuery(".signInClick").on('click' , function(){ jQuery('.signUpClick').removeClass('active'); jQuery(this).addClass('active'); jQuery('.forgetpasswordcontainer').fadeOut(); jQuery('.siginupcontainer').fadeOut(); jQuery('.siginincontainer').fadeIn(); }); jQuery(".forgetPasswordClick").on('click' , function(){ jQuery('.siginupcontainer').fadeOut(); jQuery('.siginincontainer').fadeOut(); jQuery('.forgetpasswordcontainer').fadeIn(); }); jQuery(".cancelClick").on('click' , function(){ jQuery('.siginupcontainer').fadeOut(); jQuery('.forgetpasswordcontainer').fadeOut(); jQuery('.siginincontainer').fadeIn(); }); jQuery(window).load(function(){ if(jQuery(this).width() < 981){ jQuery(".claimformtrigger").on('click' , function(){ if(jQuery('.claimform').hasClass('claimform-open')){ jQuery('.claimform').removeClass("claimform-open"); jQuery('.claimform').hide(); }else{ jQuery(this).closest('.post-row').addClass('rowopen'); jQuery('.claimform').addClass("claimform-open"); jQuery('.claimform').show(); }}); } jQuery(window).resize(function (){ if(jQuery(this).width() < 781){ jQuery('.mobilemap').removeAttr('id'); jQuery('.mobilemap').removeClass('md-modal'); jQuery('.mobilemap').removeClass('md-effect-3'); jQuery('.mobilelink').removeClass('md-trigger'); jQuery('.mobile-map-space .md-overlayi').removeClass('md-overlay'); jQuery('.listing-container-right .md-overlayi').removeClass('md-overlay'); jQuery(".mobilelink").on('click' , function(){ if(jQuery('.mobilemap').hasClass('map-open')){ jQuery('.mobilemap').removeClass("map-open"); jQuery('.mobilemap .mapbilemap-content').css({"opacity":"0","margin-top":"-520px"}); jQuery("a.mobilelink").text("View on map"); }else{ jQuery('.mobilemap').addClass("map-open"); jQuery('.mobilemap .mapbilemap-content').css({"opacity":"1","margin-top":"0px"}); jQuery("a.mobilelink").text("Close map"); }}); jQuery(".quickformtrigger").on('click' , function(){ if(jQuery('.quickform').hasClass('quickform-open')){ jQuery('.quickform').removeClass("quickform-open"); jQuery('.quickform').slideUp(600); }else{ jQuery('.quickform').addClass("quickform-open"); jQuery('.quickform').slideDown(600); }}); }else{ var headertop=jQuery('header').height(); jQuery('.section-fixed').css('padding-top',headertop+'px'); }}).resize(); jQuery('.listing-sidebar-left .form-inline').fadeTo(600 , 1); jQuery('.post-with-map-container .form-inline').fadeTo(600 , 1); jQuery('#menu').css('display','block'); jQuery('.spinner').css("display","none"); L.Google=L.Class.extend({ includes: L.Mixin.Events, options: { minZoom: 0, maxZoom: 18, tileSize: 256, subdomains: 'abc', errorTileUrl: '', attribution: '', opacity: 1, continuousWorld: false, noWrap: false, mapOptions: { backgroundColor: '#dddddd' }}, initialize: function(type, options){ L.Util.setOptions(this, options); this._ready=google.maps.Map!=undefined; if(!this._ready) L.Google.asyncWait.push(this); this._type=type||'SATELLITE'; }, onAdd: function(map, insertAtTheBottom){ this._map=map; this._insertAtTheBottom=insertAtTheBottom; this._initContainer(); this._initMapObject(); map.on('viewreset', this._resetCallback, this); this._limitedUpdate=L.Util.limitExecByInterval(this._update, 150, this); map.on('move', this._update, this); map.on('zoomanim', this._handleZoomAnim, this); map._controlCorners['bottomright'].style.marginBottom="20px"; this._reset(); this._update(); }, onRemove: function(map){ this._map._container.removeChild(this._container); this._map.off('viewreset', this._resetCallback, this); this._map.off('move', this._update, this); this._map.off('zoomanim', this._handleZoomAnim, this); map._controlCorners['bottomright'].style.marginBottom="0em"; }, getAttribution: function(){ return this.options.attribution; }, setOpacity: function(opacity){ this.options.opacity=opacity; if(opacity < 1){ L.DomUtil.setOpacity(this._container, opacity); }}, setElementSize: function(e, size){ e.style.width=size.x + "px"; e.style.height=size.y + "px"; }, _initContainer: function(){ var tilePane=this._map._container, first=tilePane.firstChild; if(!this._container){ this._container=L.DomUtil.create('div', 'leaflet-google-layer leaflet-top leaflet-left'); this._container.id="_GMapContainer_" + L.Util.stamp(this); this._container.style.zIndex="auto"; } tilePane.insertBefore(this._container, first); this.setOpacity(this.options.opacity); this.setElementSize(this._container, this._map.getSize()); }, _initMapObject: function(){ if(!this._ready) return; this._google_center=new google.maps.LatLng(0, 0); var map=new google.maps.Map(this._container, { center: this._google_center, zoom: 0, tilt: 0, mapTypeId: google.maps.MapTypeId[this._type], disableDefaultUI: false, keyboardShortcuts: false, draggable: false, disableDoubleClickZoom: true, scrollwheel: false, streetViewControl: true, styles: this.options.mapOptions.styles, backgroundColor: this.options.mapOptions.backgroundColor }); var _this=this; this._reposition=google.maps.event.addListenerOnce(map, "center_changed", function(){ _this.onReposition(); }); this._google=map; google.maps.event.addListenerOnce(map, "idle", function(){ _this._checkZoomLevels(); }); }, _checkZoomLevels: function(){ if(this._google.getZoom()!==this._map.getZoom()){ this._map.setZoom(this._google.getZoom()); }}, _resetCallback: function(e){ this._reset(e.hard); }, _reset: function(clearOldContainer){ this._initContainer(); }, _update: function(e){ if(!this._google) return; this._resize(); var center=e&&e.latlng ? e.latlng:this._map.getCenter(); var _center=new google.maps.LatLng(center.lat, center.lng); this._google.setCenter(_center); this._google.setZoom(this._map.getZoom()); this._checkZoomLevels(); }, _resize: function(){ var size=this._map.getSize(); if(this._container.style.width==size.x && this._container.style.height==size.y) return; this.setElementSize(this._container, size); this.onReposition(); }, _handleZoomAnim: function (e){ var center=e.center; var _center=new google.maps.LatLng(center.lat, center.lng); this._google.setCenter(_center); this._google.setZoom(e.zoom); }, onReposition: function(){ if(!this._google) return; google.maps.event.trigger(this._google, "resize"); }}); L.Google.asyncWait=[]; L.Google.asyncInitialize=function(){ var i; for (i=0; i < L.Google.asyncWait.length; i++){ var o=L.Google.asyncWait[i]; o._ready=true; if(o._container){ o._initMapObject(); o._update(); }} L.Google.asyncWait=[]; }; L.HtmlIcon=L.Icon.extend({ options: { }, initialize: function(options){ L.Util.setOptions(this, options); }, createIcon: function(){ var div=document.createElement('div'); div.innerHTML=this.options.html; if(div.classList) div.classList.add('leaflet-marker-icon'); else div.className +=' ' + 'leaflet-marker-icon'; return div; }, createShadow: function(){ return null; }}); jQuery(".all-list-map").on('click', function(){ var defmaplat=jQuery('body').data('defaultmaplat'); var defmaplong=jQuery('body').data('defaultmaplot'); jQuery('.map-pop').empty(); if(jQuery('#map-section').is('.map-container3')){ jQuery('.map-pop').html('
'); }else{ jQuery('.map-pop').html('
'); } var map=null $mtoken=jQuery('#page').data("mtoken"); $mapboxDesign=jQuery('#page').data("mstyle"); if($mtoken!=''){ L.mapbox.accessToken=$mtoken; map=L.mapbox.map('map', 'mapbox.streets'); L.tileLayer('https://api.tiles.mapbox.com/v4/'+$mapboxDesign+'/{z}/{x}/{y}.png?access_token='+$mtoken+'', { maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, ' + 'CC-BY-SA, ' + 'Imagery © Mapbox', id: 'mapbox.light' }).addTo(map); var markers=new L.MarkerClusterGroup(); initializeMap(markers); if(markers===undefined){}else{ map.fitBounds(markers.getBounds()); map.scrollWheelZoom.disable(); }}else{ var map=new L.Map('map', { minZoom: 3, }).setView(new L.LatLng(defmaplat, defmaplong), 18); L.tileLayer('http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',{ maxZoom: 18, subdomains:['mt0','mt1','mt2','mt3'], noWrap: true, }); var googleLayer=new L.Google('ROADMAP'); map.addLayer(googleLayer); var markers=new L.MarkerClusterGroup(); initializeMap(markers); if(markers===undefined){}else{ map.fitBounds(markers.getBounds(), {padding: [50, 50]}); }} function initializeMap(markers){ markers.clearLayers(); jQuery(".lp-grid-box-contianer").each(function(i){ var LPtitle=jQuery(this).data("title"); var LPposturl=jQuery(this).data("posturl"); var LPlattitue=jQuery(this).data("lattitue"); var LPlongitute=jQuery(this).data("longitute"); var LPpostid=jQuery(this).data("postid"); if(jQuery('.v2-map-load').length==1){ var LPaddress=jQuery(this).find('.gaddress').text(); var LPimageSrc=jQuery(this).find('.lp-listing-top-thumb').find('img').attr('src'); var LPiconSrc=jQuery(this).find('.cat-icon').find('img').attr('src'); }else{ var LPaddress=jQuery(this).find('.gaddress').text(); var LPimageSrc=jQuery(this).find('.lp-grid-box-thumb').find('img').attr('src'); var LPiconSrc=jQuery(this).find('.cat-icon').find('img').attr('src'); } if(LPlattitue!=''&&LPlongitute!=''){ var LPimage=''; if(LPimageSrc!=''){ LPimage=LPimageSrc; } var LPicon=''; if(LPiconSrc!=''){ LPicon=LPiconSrc; } var markerLocation=new L.LatLng(LPlattitue, LPlongitute); var CustomHtmlIcon=L.HtmlIcon.extend({ options:{ html:"
", }}); var customHtmlIcon=new CustomHtmlIcon(); var marker=new L.Marker(markerLocation, {icon: customHtmlIcon}).bindPopup('
'+LPtitle+'

'+LPaddress+'

').addTo(map); markers.addLayer(marker); map.addLayer(markers); }}); };}); jQuery(document).on('click', '.v2-map-load .v2mapwrap, .listing-app-view-bar .right-icons a, .sidemap-fixed .sidemarpInside', function(e){ if(jQuery('#map').is('.mapSidebar')){ var defmaplat=jQuery('body').data('defaultmaplat'); var defmaplong=jQuery('body').data('defaultmaplot'); jQuery('.map-pop').empty(); jQuery('.map-pop').html('
'); var map=null $mtoken=jQuery('#page').data("mtoken"); $mapboxDesign=jQuery('#page').data("mstyle"); if($mtoken!=''){ L.mapbox.accessToken=$mtoken; map=L.mapbox.map('map', 'mapbox.streets') .setView([defmaplat, defmaplong], 2); L.tileLayer('https://api.tiles.mapbox.com/v4/'+$mapboxDesign+'/{z}/{x}/{y}.png?access_token='+$mtoken+'', { maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, ' + 'CC-BY-SA, ' + 'Imagery © Mapbox', id: 'mapbox.light' }).addTo(map); var markers=new L.MarkerClusterGroup(); initializeMap(markers); map.fitBounds(markers.getBounds(), {padding: [50, 50]}); jQuery(document).on('click','.open-map-view', function(){ L.Util.requestAnimFrame(map.invalidateSize,map,!1,map._container); }); }else{ var map=new L.Map('map', { minZoom: 3, }).setView(new L.LatLng(defmaplat, defmaplong), 6); L.tileLayer('http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',{ maxZoom: 6, subdomains:['mt0','mt1','mt2','mt3'], noWrap: true, }); var googleLayer=new L.Google('ROADMAP'); map.addLayer(googleLayer); var markers=new L.MarkerClusterGroup(); resmarkers=initializeMap(markers); if(resmarkers===undefined){}else{ map.fitBounds(markers.getBounds(), {padding: [50, 50]}); map.scrollWheelZoom.enable(); map.invalidateSize(); map.dragging.enable(); jQuery(document).on('click','.open-map-view', function(){ L.Util.requestAnimFrame(map.invalidateSize,map,!1,map._container); }); }} function initializeMap(markers){ if(jQuery('.lp-grid-box-contianer').length!=0){ markers.clearLayers(); jQuery(".lp-grid-box-contianer").each(function(i){ var LPtitle=jQuery(this).data("title"); var LPposturl=jQuery(this).data("posturl"); var LPlattitue=jQuery(this).data("lattitue"); var LPlongitute=jQuery(this).data("longitute"); var LPpostid=jQuery(this).data("postid"); var LPiconSrc=''; if(jQuery('.v2-map-load').length==1){ if(jQuery('.v2-map-load').hasClass('v2_map_load_old')){ var LPaddress=jQuery(this).find('.gaddress').text(); var LPimageSrc=jQuery(this).find('.lp-grid-box-thumb').find('img').attr('src'); if(typeof jQuery("body").data('deficon')!=='undefined'){ LPiconSrc=jQuery("body").data('deficon'); }else{ LPiconSrc=jQuery(this).find('.cat-icon').find('img').attr('src'); }}else{ var LPaddress=jQuery(this).find('.lp-listing-location').find('a').text(); var LPimageSrc=jQuery(this).find('.lp-listing-top-thumb').find('img').attr('src'); if(typeof jQuery("body").data('deficon')!=='undefined'){ LPiconSrc=jQuery("body").data('deficon'); }else{ LPiconSrc=jQuery(this).find('.cat-icon').find('img').attr('src'); }} }else{ var LPaddress=jQuery(this).find('.gaddress').text(); var LPimageSrc=jQuery(this).find('.lp-grid-box-thumb').find('img').attr('src'); if(typeof jQuery("body").data('deficon')!=='undefined'){ LPiconSrc=jQuery("body").data('deficon'); }else{ LPiconSrc=jQuery(this).find('.cat-icon').find('img').attr('src'); }} if(LPlattitue!=''&&LPlongitute!=''){ var LPimage=''; if(LPimageSrc!=''){ LPimage=LPimageSrc; } var LPicon=''; if(LPiconSrc!=''){ LPicon=LPiconSrc; } var markerLocation=new L.LatLng(LPlattitue, LPlongitute); var CustomHtmlIcon=L.HtmlIcon.extend({ options:{ html:"
", }}); var customHtmlIcon=new CustomHtmlIcon(); var marker=new L.Marker(markerLocation, {icon: customHtmlIcon}).bindPopup('
'+LPtitle+'

'+LPaddress+'

').addTo(map); markers.addLayer(marker); map.addLayer(markers); }}); return true; }} }}); if(jQuery('#cpmap').is('.contactmap')){ jQuery('#cpmap').empty(); var map=null; $mtoken=jQuery('#page').data("mtoken"); $siteURL=jQuery('#page').data("site-url"); $lat=jQuery('.cp-lat').data("lat"); $lan=jQuery('.cp-lan').data("lan"); if($mtoken!=''){ L.mapbox.accessToken=$mtoken; var map=L.mapbox.map('cpmap', 'mapbox.streets') .setView([$lat,$lan], 14); map.scrollWheelZoom.disable(); }else{ var map=new L.Map('cpmap', '').setView(new L.LatLng($lat, $lan), 16); var googleLayer=new L.Google('ROADMAP'); map.addLayer(googleLayer); map.scrollWheelZoom.disable(); } var markers=new L.MarkerClusterGroup(); var $pinicon=jQuery('#cpmap').data('pinicon'); if($pinicon===""){ $pinicon="
"; }else{ $pinicon="
"; } var markerLocation=new L.LatLng($lat, $lan); var CustomHtmlIcon=L.HtmlIcon.extend({ options:{ html:$pinicon, }}); var customHtmlIcon=new CustomHtmlIcon(); var marker=new L.Marker(markerLocation, {icon: customHtmlIcon}).bindPopup('').addTo(map); markers.addLayer(marker); }else if(jQuery('#map').is('.singlebigpost')){ jQuery(".singlebigmaptrigger").click(function(){ $mtoken=jQuery('#page').data("mtoken"); $siteURL=jQuery('#page').data("site-url"); $lat=jQuery('.singlebigmaptrigger').data("lat"); $lan=jQuery('.singlebigmaptrigger').data("lan"); if($mtoken!=''){ L.mapbox.accessToken=$mtoken; var map=L.mapbox.map('map', 'mapbox.streets') .setView([$lat,$lan], 14); var markers=new L.MarkerClusterGroup(); var markerLocation=new L.LatLng($lat, $lan); var CustomHtmlIcon=L.HtmlIcon.extend({ options:{ html:"
", }}); var customHtmlIcon=new CustomHtmlIcon(); var marker=new L.Marker(markerLocation, {icon: customHtmlIcon}).bindPopup('').addTo(map); markers.addLayer(marker); map.fitBounds(markers.getBounds()); map.scrollWheelZoom.disable(); map.invalidateSize(); }else{ var map=new L.Map('map', {center: new L.LatLng($lat,$lan), zoom: 14}); var googleLayer=new L.Google('ROADMAP'); map.addLayer(googleLayer); var markers=new L.MarkerClusterGroup(); var markerLocation=new L.LatLng($lat, $lan); var CustomHtmlIcon=L.HtmlIcon.extend({ options:{ html:"
", }}); var customHtmlIcon=new CustomHtmlIcon(); var marker=new L.Marker(markerLocation, {icon: customHtmlIcon}).bindPopup('').addTo(map); markers.addLayer(marker); map.fitBounds(markers.getBounds()); map.scrollWheelZoom.disable(); map.invalidateSize(); }}); }}); jQuery.widget("custom.combobox", { _create: function(){ this.wrapper=jQuery("") .addClass("custom-combobox") .insertAfter(this.element); this.element.hide(); this._createAutocomplete(); this._createShowAllButton(); }, _createAutocomplete: function(){ var selected=this.element.children(":selected"), value=selected.val() ? selected.text():""; this.input=jQuery("") .appendTo(this.wrapper) .val(value) .attr("title", "") .addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left lp-search-input location_input lp-home-locaton-input") .autocomplete({ delay: 0, minLength: 0, source: $.proxy(this, "_source") }) .tooltip({ tooltipClass: "ui-state-highlight" }); }, _createShowAllButton: function(){ var input=this.input, wasOpen=false; jQuery("") .attr("tabIndex", -1) .attr("title", "Show All Items") .tooltip() .appendTo(this.wrapper) .button({ icons: { primary: "ui-icon-triangle-1-s" }, text: false }) .removeClass("ui-corner-all") .addClass("custom-combobox-toggle ui-corner-right") .mousedown(function(){ wasOpen=input.autocomplete("widget").is(":visible"); }) .on('click' , function(){ input.focus(); if(wasOpen){ return; } input.autocomplete("search", ""); }); }, _source: function(request, response){ var matcher=new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); response(this.element.children("option").map(function(){ var text=jQuery(this).text(); if(this.value&&(!request.term||matcher.test(text))) return { label: text, value: text, option: this };})); }, _removeIfInvalid: function(event, ui){ if(ui.item){ return; } var value=this.input.val(), valueLowerCase=value.toLowerCase(), valid=false; this.element.children("option").each(function(){ if(jQuery(this).text().toLowerCase()===valueLowerCase){ this.selected=valid=true; return false; }}); if(valid){ return; } this.input .val("") .attr("title", value + " didn't match any item") .tooltip("open"); this.element.val(""); this._delay(function(){ this.input.tooltip("close").attr("title", ""); }, 2500); this.input.autocomplete("instance").term=""; }, _destroy: function(){ this.wrapper.remove(); this.element.show(); }}); jQuery(".comboboxs").combobox(); jQuery("#toggle").on('click' , function(){ jQuery(".comboboxs").toggle(); }); jQuery("#toggle").on('click' , function(){ jQuery("#searchcategory").toggle(); }); jQuery(".ui-autocomplete").autocomplete({ appendTo: ".input-group" }); jQuery('.custom-combobox-input').autocomplete({ minLength: 0 }); jQuery('.custom-combobox-input').on("click", function(){ jQuery(this).autocomplete("search", ""); }); jQuery(".location_input").attr("placeholder", "Your Location"); jQuery(".comboboxCategory .location_input").attr("placeholder", "Food"); jQuery(".postSubmitCat .location_input").attr("placeholder", "Chose one or more than one categories"); jQuery(document).on('click', '.md-close', function(){ jQuery('.md-modal').modal('hide'); jQuery('.md-modal').removeClass('md-show'); jQuery('.modal-backdrop').remove(); }); jQuery(document).on('click', '.qickpopup', function(){ var LPtitle=jQuery(this).closest('.lp-grid-box-contianer').data("title"); var LPlattitue=jQuery(this).closest('.lp-grid-box-contianer').data("lattitue"); var LPlongitute=jQuery(this).closest('.lp-grid-box-contianer').data("longitute"); var LPpostID=jQuery(this).closest('.lp-grid-box-contianer').data("postid"); var mapPin=jQuery(this).data('mappin'); jQuery('#listing-preview-popup .md-close').hide(); var docHeight=jQuery(document).height(); jQuery("body").prepend('
'); jQuery('#full-overlay').css('height',docHeight+'px'); jQuery('#listing-preview-popup .popup-inner-left-padding').html('').css('min-hegiht', '300px'); if(jQuery('#listing-preview-popup').is('.md-show')){ }else{ jQuery('#listing-preview-popup').modal({ show: 'true' }); jQuery('#listing-preview-popup').addClass('md-show'); } jQuery.ajax({ url: ajax_search_term_object.ajaxurl, dataType: "json", data: { 'action':'quick_preivew_cb', 'LPpostID':LPpostID }, success:function(data){ jQuery('#listing-preview-popup .md-close').show().children('i').css('right', '20px'); jQuery('#listing-preview-popup .popup-inner-left-padding').html(data); var markers=false; $mtoken=jQuery('#page').data("mtoken"); $siteURL=jQuery('#page').data("site-url"); $lat=LPlattitue; $lan=LPlongitute; $mapboxDesign=jQuery('#page').data("mstyle"); if($mtoken!=''){ L.mapbox.accessToken=$mtoken; map=L.mapbox.map('quickmap'+LPpostID, $mapboxDesign); }else{ var map=new L.Map('quickmap'+LPpostID, {center: new L.LatLng($lat,$lan), zoom: 14}); var googleLayer=new L.Google('ROADMAP'); map.addLayer(googleLayer); } map.setView([$lat,$lan], 14); markers=new L.MarkerClusterGroup(); var markerLocation=new L.LatLng($lat, $lan); var CustomHtmlIcon=L.HtmlIcon.extend({ options:{ html:'
', }}); var customHtmlIcon=new CustomHtmlIcon(); var marker=new L.Marker(markerLocation, {icon: customHtmlIcon}).bindPopup('').addTo(map); markers.addLayer(marker); jQuery('.md-close.widget-map-click').click(function(e){ jQuery('#full-overlay').remove(); }); }, error: function(errorThrown){ alert(errorThrown); }}); }); jQuery('.post-meta-right-box a.secondary-btn[href^="#"]').on('click',function (e){ e.preventDefault(); var target=this.hash; var $target=jQuery(target); jQuery('html, body').stop().animate({ 'scrollTop': $target.offset().top }, 900, 'swing', function (){ window.location.hash=target; }); }); var submitlink=jQuery('body').data('submitlink'); var siteurl=jQuery('#page').data('site-url'); var sitelogo=jQuery('#page').data('sitelogo'); jQuery('#menu').mmenu({ navbar: { title: "" }, navbars:{ height:3, content:[ '
', ] }}); var API=jQuery("#menu").data("mmenu"); jQuery(".lpl-button.md-trigger, .sign-login-wrap .md-trigger").click(function(){ API.close(); }); jQuery('.chosen-select2').chosen({ disable_search: true }); jQuery('.chosen-select1').chosen({ disable_search: true }); jQuery('.chosen-select7').chosen({ disable_search: true }); jQuery('.chosen-select5').chosen({ disable_search: true }); var $tags=jQuery('#searchtags').chosen(), LPnewTags=function(){ jQuery('.LPtagsContainer').empty(); $tags.find(':selected').each(function(i, obj){ jQuery('
' + obj.value + '
').appendTo('.LPtagsContainer').on('click', function(){ jQuery(this).remove(); jQuery(obj).attr('selected', false); $tags.trigger("chosen:updated"); jQuery('.LPtagsContainer input[value="' + obj.value + '"]').remove(); }); jQuery('').appendTo('.LPtagsContainer'); }); }; $tags.on('change', LPnewTags); var social=jQuery('.post-stat li ul.social-icons.post-socials'); var socialOvrly=jQuery('.reviews.sbutton .md-overlay'); jQuery('.sbutton a.reviews-quantity').on('click', function(event){ event.preventDefault(); social.fadeIn(400); if(socialOvrly.hasClass('hide')){ jQuery(socialOvrly).removeClass('hide'); jQuery(socialOvrly).addClass('show'); }else{ jQuery(socialOvrly).removeClass('show'); jQuery(socialOvrly).addClass('hide'); }}); socialOvrly.on('click', function(event){ event.preventDefault(); social.fadeOut(400); if(socialOvrly.hasClass('show')){ jQuery(socialOvrly).removeClass('show'); jQuery(socialOvrly).addClass('hide'); }else{ jQuery(socialOvrly).removeClass('hide'); jQuery(socialOvrly).addClass('show'); }}); jQuery('a.make-reservation').on('click', function(event){ event.preventDefault(); jQuery('.ifram-reservation').fadeIn(400); }); jQuery('a.close-btn').on('click', function(event){ event.preventDefault(); jQuery('.ifram-reservation').fadeOut(400); }); if(jQuery(window).width() > 767){ jQuery('.widget-box a.open-modal, .menu-hotel a.open-modal').on('click', function(event){ event.preventDefault(); jQuery('.hotel-menu').fadeIn(400); }); jQuery('a.close-menu-popup').on('click', function(event){ event.preventDefault(); jQuery('.hotel-menu').fadeOut(400); }); }else if(jQuery(window).width() < 767){ jQuery('.widget-box a.open-modal, .menu-hotel a.open-modal').on('click', function(event){ event.preventDefault(); jQuery('.hotel-menu').slideToggle(400); }); } jQuery('a.switch-fields').on('click', function(event){ event.preventDefault(); jQuery(this).toggleClass('active'); jQuery('.hidden-items').fadeToggle(400); }); jQuery('a.dismiss').on('click', function(event){ event.preventDefault(); jQuery(this).parent('.panel-dash-dismiss').slideUp(400); }); jQuery(document).on('mouseenter','.lp-grid-box-contianer',function(){ var cardID=jQuery(this).data("postid"); var cardclass='.lpmap-icon-shape.card'+cardID; if(jQuery(cardclass).hasClass('cardHighlight')){ jQuery(cardclass).removeClass("cardHighlight"); }else{ jQuery(cardclass).addClass("cardHighlight"); }}); jQuery(document).on('mouseleave','.lp-grid-box-contianer',function(){ var cardID=jQuery(this).data("postid"); var cardclass='.lpmap-icon-shape.card'+cardID; jQuery(cardclass).removeClass("cardHighlight"); }); jQuery('.postsubmitSelect').on('change', function(){ jQuery('.feature-fields-error-container').remove(); jQuery('.featuresDataContainerOuterSubmit').show(); jQuery('.featuresDataRow').show(); var cvalue=jQuery(this).val() ; jQuery('.featuresData').css({'opacity':'0','visibility':'hidden','display':'none'}); jQuery('.featuresDataContainer').find('.featuresData'+cvalue).css({'opacity':'1','visibility':'visible','display':'block'}); }); }); jQuery(document).on('change', '.btn-file :file', function(){ var input=jQuery(this), numFiles=input.get(0).files ? input.get(0).files.length:1, label=input.val().replace(/\\/g, '/').replace(/.*\//, ''); input.trigger('fileselect', [numFiles, label]); }); jQuery(document).ready(function(){ if(jQuery('form').is('#lp-submit-formdf')){ var validator=new FormValidator('lp-submit-form', [ { name: 'postTitle', display: 'Title', rules: 'required' }, { name: 'category', display: 'Category', rules: 'required' }, { name: 'postContent', display: 'Description', rules: 'required' }, { name: 'location', display: 'Location', rules: 'required' }, { name: 'gAddress', display: 'Google Address', rules: 'required' },{ name: 'email', rules: 'valid_email', },{ name: 'username', display: 'UserName', rules: 'required' },{ name: 'policycheck', display: 'Terms and Conditions Check', rules: 'required' }], function(errors, evt){ var SELECTOR_ERRORS=jQuery('.error_box'), SELECTOR_SUCCESS=jQuery('.success_box'); if(errors.length > 0){ SELECTOR_ERRORS.empty(); for (var i=0, errorLength=errors.length; i < errorLength; i++){ SELECTOR_ERRORS.append(errors[i].message + '
'); } SELECTOR_SUCCESS.css({ display: 'none' }); SELECTOR_ERRORS.fadeIn(200); }else{ SELECTOR_ERRORS.css({ display: 'none' }); SELECTOR_SUCCESS.fadeIn(200); }}); }}); var image_custom_uploader; var $thisItem=''; jQuery(document).on('click','.upload-author-image', function(e){ e.preventDefault(); $thisItem=jQuery(this); $form=jQuery('#profileupdate'); if(image_custom_uploader){ image_custom_uploader.open(); return; } image_custom_uploader=wp.media.frames.file_frame=wp.media({ title: 'Choose Image', button: { text: 'Choose Image' }, multiple: false }); image_custom_uploader.on('select', function(){ attachment=image_custom_uploader.state().get('selection').first().toJSON(); var url=''; url=attachment['url']; var attachId=''; attachId=attachment['id']; jQuery("img.author-avatar").attr({ src: url }); $form.parent().parent().find(".criteria-image-url").attr({ value: url }); $form.parent().parent().find(".criteria-image-id").attr({ value: attachId }); }); image_custom_uploader.open(); }); jQuery(document).ready(function($){ jQuery('#listings_checkout input[name=listing_id]').on('change', function(){ jQuery('#listings_checkout input[name=post_id]').val(jQuery(this, '#listings_checkout').val()); }); jQuery('#listings_checkout input[name=plan]').on('change', function(){ jQuery('#listings_checkout input[name=method]').val(jQuery(this, '#listings_checkout').val()); }); jQuery('.lp-promotebtn').on('click', function(){ var $this=jQuery(this); jQuery('#ads_promotion input[name=listing_id]').val($this.data('listingnid')); var listtitle=$this.data('listingtitle'); jQuery('input[name=cur_listing_title]').val(listtitle); }); jQuery('#ads_promotion input[name=plan]').on('change', function(){ jQuery('#ads_promotion input[name=method]').val(jQuery(this, '#listings_checkout').val()); }); }); jQuery('.availableprice_options input').change(function($){ var $total, taxrate='', taxprice, taxTotal; if(jQuery('span').hasClass('pricetax')){ taxrate=jQuery('span.pricetax').data('taxprice'); } $oldtotal=jQuery('#totalprice').val(); oldTax=jQuery('input[name="taxprice"]').val(); if(jQuery(this).is(":checked")){ var $val=jQuery(this).val(); $total=parseFloat($val)+parseFloat($oldtotal); taxprice=parseFloat((taxrate/100)*$val); taxTotal=parseFloat(oldTax)+parseFloat(taxprice); $total=$total+taxprice; $total=$total.toFixed(2); taxTotal=taxTotal.toFixed(2); jQuery('#totalprice').val($total); jQuery('.pricetotal #price').html($total); jQuery('input[name="lp_total_price"]').val($total); jQuery('input[name="taxprice"]').val(taxTotal); }else{ var $val=jQuery(this).val(); $total=parseFloat($oldtotal)-parseFloat($val); taxprice=parseFloat((taxrate/100)*$val); taxTotal=parseFloat(oldTax)-parseFloat(taxprice); $total=$total-taxprice; $total=$total.toFixed(2); taxTotal=taxTotal.toFixed(2); if($total>0){ jQuery('#totalprice').val($total); jQuery('.pricetotal #price').html($total); jQuery('input[name="lp_total_price"]').val($total); jQuery('input[name="taxprice"]').val(taxTotal); }else{ $total=0.00; jQuery('#totalprice').val($total); jQuery('.pricetotal #price').html($total); jQuery('input[name="lp_total_price"]').val($total); jQuery('input[name="taxprice"]').val(taxTotal); }} }); jQuery('.lp-front').on('click','.lp-frontBtn' ,function(e){ e.preventDefault(); jQuery('.lp-front').slideUp(500); jQuery('.lp-back1').slideDown(1000); }); jQuery('.lp-back1').on('click','#lp-back1' ,function(e){ e.preventDefault(); jQuery('.lp-back1').slideUp(500); jQuery('.lp-front').slideDown(1000); }); jQuery('.lp-back1').on('click','#lp-next' ,function(e){ e.preventDefault(); jQuery('.lp-back1').slideUp(500); jQuery('.lp-back2').slideDown(1000); }); jQuery('.lp-back2').on('click','#lp-back2' ,function(e){ e.preventDefault(); jQuery('.lp-back2').slideUp(500); jQuery('.lp-back1').slideDown(1000); }); jQuery(document).ready(function($){ jQuery('.invoice-section a.showme').click(function(ev){ var $this=jQuery(this); $this.after(''); ev.preventDefault(); var rowid=jQuery(this).data('id'); reqlink=jQuery(this).data('url'); var invoiceFor=''; invoiceFor=jQuery(this).data('lpinvoice'); jQuery.get(reqlink+'?lp_p_id=' + rowid+'&lp_invoice=' + invoiceFor, function(html){ jQuery('#modal-invoice .modal-body').html(''); jQuery('#modal-invoice .modal-body').html(html); jQuery('#modal-invoice').modal('show', {backdrop: 'static'}); $this.next('.lp-modal-spinn').hide(''); $this.next('.lp-modal-spinn').remove(''); }); }); }); jQuery(function($){ 'use strict'; jQuery("#modal-invoice").find('.lp-print-list').on('click', function(){ var divToPrint=document.getElementById('modal-invoice'); var newWin=window.open('','Print-Window'); newWin.document.open(); newWin.document.write(''+divToPrint.innerHTML+''); newWin.document.close(); setTimeout(function(){newWin.close();},10); }); }); jQuery(document).ready(function($){ jQuery('.googleAddressbtn').on('click', function(e){ var dtype=jQuery(this).data('type'); if(dtype=="gaddress"){ jQuery('.post-submit #inputAddresss').slideUp(300); jQuery('.lp-custom-lat').slideUp(300); jQuery('.post-submit #inputAddress').slideDown(); jQuery('.post-submit .googlefulladdress').slideDown(300); jQuery('.post-submit #latitude').attr('type', 'hidden'); jQuery('.post-submit #longitude').attr('type', 'hidden'); jQuery(this).next('.googleAddressbtn').removeClass('active'); jQuery(this).addClass('active'); }else{ jQuery('.post-submit #inputAddress').slideUp(); jQuery('.post-submit .googlefulladdress').slideUp(300); jQuery('.post-submit #inputAddresss').slideDown(300); jQuery('.lp-custom-lat').slideDown(300); jQuery('.post-submit #latitude').attr('type', 'text'); jQuery('.post-submit #longitude').attr('type', 'text'); jQuery(this).prev('.googleAddressbtn').removeClass('active'); jQuery(this).addClass('active'); } e.preventDefault(); }); }); jQuery(document).ready(function($){ jQuery('#slide-nav.navbar-inverse').after(jQuery('')); jQuery('#slide-nav.navbar-default').after(jQuery('')); var toggler='.navbar-toggle'; var pagewrapper='#page-content'; var navigationwrapper='.navbar-header'; var menuwidth='100%'; var slidewidth='80%'; var menuneg='-100%'; var slideneg='-80%'; jQuery("#slide-nav").on("click", toggler, function (e){ var selected=$(this).hasClass('slide-active'); jQuery('#slidemenu').stop().animate({ left: selected ? menuneg:'0px' }); jQuery('#navbar-height-col').stop().animate({ left: selected ? slideneg:'0px' }); jQuery(pagewrapper).stop().animate({ left: selected ? '0px':slidewidth }); jQuery(navigationwrapper).stop().animate({ left: selected ? '0px':slidewidth }); jQuery(this).toggleClass('slide-active', !selected); jQuery('#slidemenu').toggleClass('slide-active'); jQuery('#page-content, .navbar, body, .navbar-header').toggleClass('slide-active'); }); var selected='#slidemenu, #page-content, body, .navbar, .navbar-header'; jQuery(window).on("resize", function (){ if(jQuery(window).width() > 767&&$('.navbar-toggle').is(':hidden')){ jQuery(selected).removeClass('slide-active'); }}); jQuery('.lp_price_trigger_checkout input').on('click', function($){ var taxEnable=jQuery(this).data('taxenable'); plantitle=jQuery(this).data('title'); planprice=jQuery(this).data('planprice'); taxprice=''; totalprice=''; if(taxEnable=="1"){ taxrate=jQuery('.lp_price_trigger_checkout input').data('taxrate'); taxprice=(taxrate/100)*planprice; taxprice=taxprice.toFixed(2); jQuery('input[name="listings_tax_price"]').attr('value', taxprice); totalprice=parseFloat(planprice) + parseFloat(taxprice); totalprice=totalprice.toFixed(2); jQuery('span#lp_price_plan').text(plantitle); jQuery('span#lp_price_plan_price').text(planprice); jQuery('span#lp_tax_price').text(taxprice); jQuery('span#lp_price_subtotal').text(totalprice); jQuery('input#lp_paypal_price').val(totalprice); jQuery('.lp_section_inner .lp_billing_total').show(400); }else{ totalprice=parseFloat(planprice); jQuery('span#lp_price_plan').text(plantitle); jQuery('span#lp_price_plan_price').text(planprice); jQuery('span#lp_price_subtotal').text(totalprice); jQuery('input#lp_paypal_price').val(totalprice); }}); if(jQuery('form#register .check_policy').is('.termpolicy')){ jQuery("input#lp_usr_reg_btn").prop('disabled',true); jQuery('.check_policy').on('click', function(){ if(jQuery('#check_policy').is(':checked')){ jQuery("input#lp_usr_reg_btn").prop('disabled',false); }else{ jQuery("input#lp_usr_reg_btn").prop('disabled',true); }}); } if(jQuery('.blue-section .check_policy').is('.termpolicy')){ jQuery("#listingsubmitBTN").prop('disabled',true); jQuery("#listingsubmitBTN").addClass('dissablebutton'); jQuery('.check_policy').on('click', function(){ if(jQuery('#policycheck').is(':checked')){ jQuery("#listingsubmitBTN").prop('disabled',false); jQuery("#listingsubmitBTN").removeClass('dissablebutton'); }else{ jQuery("#listingsubmitBTN").prop('disabled',true); jQuery("#listingsubmitBTN").addClass('dissablebutton'); }}); } if(jQuery('.white-section .check_policy').is('.termpolicy')){ jQuery("#listingsubmitBTN").prop('disabled',true); jQuery("#listingsubmitBTN").addClass('dissablebutton'); jQuery('.check_policy').on('click', function(){ if(jQuery('#policycheck').is(':checked')){ jQuery("#listingsubmitBTN").prop('disabled',false); jQuery("#listingsubmitBTN").removeClass('dissablebutton'); }else{ jQuery("#listingsubmitBTN").prop('disabled',true); jQuery("#listingsubmitBTN").addClass('dissablebutton'); }}); }}); jQuery(window).ready(function(){ if(jQuery('.header-container').hasClass('.lp-vedio-bg')){ jQuery('#lp_vedio').play(); } if(jQuery('input').is('.rating-tooltip')){ jQuery('.rating-tooltip').rating({ extendSymbol: function (rate){ jQuery(this).tooltip({ container: 'body', placement: 'bottom', title: 'Rate ' + rate }); }}); }}); jQuery(document).ready(function($){ if(jQuery('.lp-home-banner-contianer').is('.lp-home-banner-with-loc')){ var locType=jQuery('.lp_auto_loc_container h1').data('locnmethod'); var currentlocationswitch='1'; var currentlocationswitch=jQuery('#page').data('lpcurrentloconhome'); if(currentlocationswitch=="0"){ locType='locationifoff'; } var apiType=jQuery('#page').data('ipapi'); if(locType=="withip"){ if(apiType==="geo_ip_db"){ $.getJSON('https://geoip-db.com/json/geoip.php?jsonp=?') .done (function(location){ var locc=location.city; if(locc==null){ }else{ jQuery('.lp-dyn-city').text(location.city); }}); } else if(apiType==="ip_api"){ jQuery.get("https://ipapi.co/json", function(location){ var locc=location.city; if(locc==null){ }else{ jQuery('.lp-dyn-city').text(location.city); }}, "json"); }else{ lpGetGpsLocName(function (lpgetcurrentcityvalue){ lpgpsclocation=lpgetcurrentcityvalue; jQuery('.lp-dyn-city').text(lpgpsclocation); }); }} } if(jQuery('.lp-header-search-tagline').length!=0){ var locType=jQuery('.lp_auto_loc_container .lp-header-search-tagline').data('locnmethod'); var currentlocationswitch='1'; var currentlocationswitch=jQuery('#page').data('lpcurrentloconhome'); if(currentlocationswitch=="0"){ locType='locationifoff'; } var apiType=jQuery('#page').data('ipapi'); if(locType=="withip"){ if(apiType==="geo_ip_db"){ $.getJSON('https://geoip-db.com/json/geoip.php?jsonp=?') .done (function(location){ var locc=location.city; if(locc==null){ }else{ jQuery('.lp-dyn-city').text(location.city); }}); } else if(apiType==="ip_api"){ jQuery.get("https://ipapi.co/json", function(location){ var locc=location.city; if(locc==null){ }else{ jQuery('.lp-dyn-city').text(location.city); }}, "json"); }else{ lpGetGpsLocName(function (lpgetcurrentcityvalue){ lpgpsclocation=lpgetcurrentcityvalue; jQuery('.lp-dyn-city').text(lpgpsclocation); }); }} }}); function hexToRGB(hexStr){ var col={}; col.r=parseInt(hexStr.substr(1,2),16); col.g=parseInt(hexStr.substr(3,2),16); col.b=parseInt(hexStr.substr(5,2),16); return col; } jQuery(document).ready(function(){ var plantype=''; var recurringtext=''; var recurringhtml=''; var $thislisting=''; var $thisplan=''; var $recurringon=''; $recurringon=jQuery('form#listings_checkout').data('recurring'); if($recurringon==="yes"){ jQuery('#listings_checkout input[type=radio]').on('change', function($){ if(jQuery('#listings_checkout input[name=listing_id]').is(':checked')&&jQuery('#listings_checkout input[name=plan]').is(':checked')){ $thislisting=jQuery('#listings_checkout input[name=listing_id]:checked'); $thisplan=jQuery('#listings_checkout input[name=plan]:checked').val(); plantype=$thislisting.closest('.lp-user-listings').data('plantype'); if(plantype==="Pay Per Listing"){ recurringtext=$thislisting.closest('.lp-user-listings').data('recurringtext'); recurringhtml='
'; if($thisplan==="stripe"){ jQuery('div.lp-recurring-button-wrap').html(recurringhtml); }else{ jQuery('div.lp-recurring-button-wrap').html(''); }}else{ jQuery('div.lp-recurring-button-wrap').html(''); }}else{ jQuery('div.lp-recurring-button-wrap').html(''); }}); } if(jQuery('input#cities').length){ jQuery('input#cities').cityAutocomplete(); } if(jQuery('input#citiess').length){ jQuery('input#citiess').cityAutocomplete(); } jQuery(document).on('click', function(e){ var target=e.target; if(!jQuery(target).is('.help')){ if(jQuery('input#citiess').length){ var isseleted=jQuery('input#citiess').data('isseleted'); if(isseleted==false){ jQuery('input#citiess').val(''); }} }}); if(jQuery('input#citiess').length){ jQuery('#citiess').on('input', function(){ jQuery(this).data('isseleted', false); }); }}) jQuery(document).ready(function($){ jQuery('#select-plan-form .select-plan-form input[name=plans-posts]').on('click', function(){ jQuery("a.lp_change_plan_action").hide(''); jQuery("div.lp-action-div form").hide(''); }); }); var nearmeunit=jQuery("#lp-find-near-me").data('nearmeunit'); if(jQuery('#distance_range').length!=0){ jQuery('#distance_range').bootstrapSlider({ formatter: function(value){ return value+' ' + nearmeunit; }, tooltip: 'always' }); } jQuery('li.lp-tooltip-outer').on('click', function(){ var $this=jQuery(this); jQuery('.lp-tooltip-div').removeClass('active'); $this.find('.lp-tooltip-div').addClass('active'); }); jQuery(document).mouseup(function(e){ var container=jQuery(".lp-tooltip-div"); if(!container.is(e.target)&&container.has(e.target).length===0){ jQuery('.lp-tooltip-div').removeClass('active'); } var containerr=jQuery(".lp-tooltip-div-hidden"); if(!containerr.is(e.target)&&containerr.has(e.target).length===0){ jQuery('.lp-tooltip-div-hidden').removeClass('active'); } var foodmenucontainer=jQuery(".hotel-menu .inner-menu"); if(!foodmenucontainer.is(e.target)&&foodmenucontainer.has(e.target).length===0){ jQuery(".hotel-menu").fadeOut(); }}); jQuery("li.lp-tooltip-outer").hover(function(){ var $this=jQuery(this); jQuery('.lp-tooltip-div').removeClass('active'); jQuery('.lp-tooltip-div-hidden').removeClass('active'); $this.find('.lp-tooltip-div').addClass('active'); if($this.find('a.near-me-btn').hasClass('active')){ jQuery('.lp-tooltip-div-hidden').addClass('active'); }}); jQuery(document).ready(function($){ jQuery('.lp-detail-page-template-3 #reply-title2 ul li').first().addClass('active'); jQuery('.lp-detail-page-template-3 .detail-page2-tab-content .tab-pane').first().addClass('active'); jQuery(document).on('click', '.listing-app-view .app-view-filters .close', function(){ var docHeight=jQuery(document).height(); jQuery("body").prepend('
'); jQuery('#full-overlay').css('height',docHeight+'px'); jQuery('#full-overlay').addClass('content-loading'); var timer=''; function lpcloseloadnow(){ jQuery('#full-overlay').remove(); jQuery('#full-overlay').removeClass('content-loading'); clearTimeout(timer); } timer=setTimeout(lpcloseloadnow, 2000); }); jQuery(document).on('click','.city-autocomplete .help', function(){ var $thisSelected=jQuery(this).text(); var $thisSelecteds=$thisSelected.split(",")[0]; var $selectLocationData='
'+$thisSelected+'
'; jQuery($selectLocationData).appendTo(".lp-selected-locs"); if(jQuery('div').hasClass('lp-selected-locs')){ jQuery("input#citiess").val(''); }}); jQuery(document).on('click','.lp-removethisloc', function(){ jQuery(this).closest('.lpsinglelocselected').remove(); }); jQuery('.top-search-form .lp-search-btn-header .lp-search-btn').on('click', function(){ var locvals=$.trim($("input#cities").val()); if(locvals.length>0){}else{ jQuery('input[name="lp_s_loc"]').val(''); }}); jQuery('input#cities').on('change', function(){ jQuery('input[name=lp_s_loc]').val(jQuery(this).val()); }); jQuery(document).on('click', '.city-autocomplete .help', function(){ $thisVal=jQuery(this).text(); substrr=$thisVal.split(",")[0]; jQuery('input[name=lp_s_loc]').val(substrr); }) jQuery('.md-close.widget-map-click').on('click', function(e){ jQuery('#full-overlay').css('height','0px'); }); }); function lpshowsidemap(){ if(jQuery('#map').is('.mapSidebar')){ if(jQuery('.v2-map-load').length==1){ jQuery("
").appendTo(jQuery(".v2-map-load")); jQuery(".v2-map-load .v2mapwrap").trigger('click'); } jQuery("
").appendTo(jQuery(".sidemap-fixed")); jQuery(".sidemap-fixed .sidemarpInside").trigger('click'); }} window.onload=lpshowsidemap; jQuery(document).ready(function($){ if(jQuery('form#registertmp .check_policyy').is('.termpolicy')){ jQuery("input#lp-template-registerbtn").prop('disabled',true); jQuery('.check_policyy').on('click', function(){ if(jQuery('#check_policyy').is(':checked')){ jQuery("input#lp-template-registerbtn").prop('disabled',false); }else{ jQuery("input#lp-template-registerbtn").prop('disabled',true); }}); } jQuery('.lp-qoute-butn a#freeQuoteForm').click(function (e){ e.preventDefault(); jQuery('html, body').animate({ scrollTop: jQuery('#freeQuoteFormWrap').offset().top }, 1000); }); jQuery('.contact-right #contactMSGForm').submit(function(e){ var uname=jQuery(this).find('input[name=uname]').val(); var uemail=jQuery(this).find('input[name=uemail]').val(); var umessage=jQuery(this).find('textarea[name=umessage]').val(); if(uname==''||uname==null){ jQuery(this).find('input[name=uname]').addClass('lp-required-field'); e.preventDefault(); } if(uemail==''||uemail==null){ jQuery(this).find('input[name=uemail]').addClass('lp-required-field'); e.preventDefault(); } if(lpisValidEmailAddress(uemail)){ }else{ jQuery(this).find('input[name=uemail]').addClass('lp-required-field'); e.preventDefault(); } if(umessage==''||umessage==null){ jQuery(this).find('textarea[name=umessage]').addClass('lp-required-field'); e.preventDefault(); }}); jQuery("input#lp-featuredimage").change(function (){ lp_change_curerntImgUrl(this); }); jQuery('.app-view-header .lp-search-toggle .user-menu i').click(function(){ jQuery('#app-view-login-popup').css({ 'top': '0px', 'transform': 'translateY(0%)' }); }); }); function lp_change_curerntImgUrl(input){ if(input.files&&input.files[0]){ jQuery('.submit_new_style-outer .lp-listing-featuredimage label').css({"max-width": "189px"}); var reader=new FileReader(); reader.onload=function (e){ jQuery('.lpchangeinstantimg').attr('src', e.target.result); jQuery('.lpchangeinstantimg').css({"width": "63px", "height": "63px"}); } reader.readAsDataURL(input.files[0]); }} jQuery(window).scroll(function (){ if(jQuery(window).scrollTop() > 790){ jQuery('.profile-sticky-bar').addClass('navbar-fixed'); jQuery('.profile-sticky-bar').fadeIn(500); } if(jQuery(window).scrollTop() < 790){ jQuery('.profile-sticky-bar').removeClass('navbar-fixed'); jQuery('.profile-sticky-bar').fadeOut(500); }}); jQuery(document).on('click', '.stickynavbar ul li a', function(e){ e.preventDefault(); var targetID=jQuery(this).attr('href'); jQuery('html,body').animate({ scrollTop: jQuery(targetID).offset().top - 125 }, 500); }); function lpisValidEmailAddress(emailAddress){ var pattern=new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); return pattern.test(emailAddress); } jQuery(document).ready(function(){ jQuery('#lp_delete_accountpopup input.lp_assign_data').on('click', function(){ jQuery('.lp_delte_user_confirm').removeAttr("disabled") }); jQuery('.lp_privacy_policy_Wrap input.lpprivacycheckboxopt').on('click', function(){ if(jQuery(this).is(':checked')){ jQuery(this).closest('form').find('input[type=submit]').removeAttr("disabled"); }else{ jQuery(this).closest('form').find('input[type=submit]').attr("disabled", "disabled"); }}); }); jQuery(document).ready(function(){ jQuery('#claim_payment_checkout').on('submit', function(e){ var $this=jQuery(this); claimerID=$this.find('input[name=claimerID]').val(); claimPost=$this.find('input[name=claimPost]').val(); claimPrice=$this.find('input[name=claimPrice]').val(); currency=$this.find('input[name=currency]').val(); claimPrice=parseFloat(claimPrice) * 100; claimPrice=parseFloat(claimPrice).toFixed(); handler.open({ name: "For Claim", description: "", zipCode: true, amount: claimPrice, currency: currency, }); e.preventDefault(); }) }); jQuery(document).ready(function(){ jQuery('.lp_add_more_filter a').on('mouseover', function(){ jQuery('.lp_more_filter_tooltip_outer').css("visibility","visible"); }); jQuery('.lp_add_more_filter a').on('mouseout', function(){ jQuery('.lp_more_filter_tooltip_outer').css("visibility","hidden"); }); }); jQuery(document).ready(function(){ jQuery('.lp_add_more_filter a').click(function(e){ e.preventDefault(); e.stopPropagation(); jQuery('.outer_all_page_overflow').toggle(); if(jQuery('.overlay_on_map_for_filter').is(':hidden')){ jQuery('.overlay_on_map_for_filter').css('display','block'); }else{ jQuery('.overlay_on_map_for_filter').css('display','none'); }}); jQuery('.outer_all_page_overflow').click(function(e){ }); jQuery('body').click(function(){ jQuery('.overlay_on_map_for_filter').css('display','none'); }); jQuery('#filter_cancel_all').on('click', function(){ jQuery('.outer_all_page_overflow').slideUp(); jQuery('.overlay_on_map_for_filter').css('display','none'); }); }); jQuery(document).on('click', '#filter_cancel_all', function(){ jQuery('.outer_all_page_overflow').slideUp(); jQuery('.overlay_on_map_for_filter').css('display','none'); jQuery('.outer_all_page_overflow').hide(500); }); jQuery(document).ready(function(){ jQuery('#listings_checkout_form input[name=listing_id]').click(function(){ if(jQuery('#listings_checkout_form input[name=listing_id]').is(':checked')){ if(jQuery('#listings_checkout_form input[name=plan]').is(':checked')){ jQuery('.lp_payment_step_next.firstStep').addClass('active'); lp_make_checkout_step_active('firstStep'); jQuery('.lp_payment_step_next.firstStep').prop('disabled', false); }else{ jQuery('.lp-checkout-steps .firstStep').removeClass('current'); jQuery('.lp_payment_step_next.firstStep').removeClass('active'); jQuery('.lp_payment_step_next.firstStep').prop('disabled', true); }} }); jQuery('#listings_checkout_form input[name=plan]').click(function(){ if(jQuery('#listings_checkout_form input[name=plan]').is(':checked')){ jQuery('input[name=method]').val(jQuery(this).val()); if(jQuery('#listings_checkout_form input[name=listing_id]').is(':checked')){ jQuery('.lp_payment_step_next.firstStep').addClass('active'); lp_make_checkout_step_active('firstStep'); jQuery('.lp_payment_step_next.firstStep').prop('disabled', false); }else{ jQuery('.lp-checkout-steps .firstStep').removeClass('current'); jQuery('.lp_payment_step_next.firstStep').removeClass('active'); jQuery('.lp_payment_step_next.firstStep').prop('disabled', true); }} }); jQuery('.lp-user-listings .radio-danger').click(function(){ $this=jQuery(this); jQuery('.lp-user-listings').removeClass('active-checkout-listing'); $this.closest('.lp-user-listings').addClass('active-checkout-listing'); }); jQuery(document).on('click', 'button.firstStep', function(){ jQuery('#listings_checkout_form input[name=listing_id]').not(':checked').closest('.lp-user-listings').css('display', 'none'); jQuery('#listings_checkout_form input[name=plan]').not(':checked').closest('.lp-method-wrap').css('display', 'none'); lp_show_mini_subtotal(); lp_reset_mincart_checkout_form_data(); lp_show_recurring_switch(); jQuery('.lp-new-term-style').css('display', 'block'); jQuery('button.lp_payment_step_next.secondStep').css("display", "block"); jQuery(this).addClass('secondStep'); jQuery(this).removeClass('firstStep'); if(jQuery(".terms-checkbox-container input[type=checkbox]").length){ jQuery('.lp_payment_step_next.secondStep').prop('disabled', true); }else{ lp_make_checkout_step_active('secondStep'); }}); jQuery(".terms-checkbox-container input[type=checkbox]").on('click', function(){ if(jQuery(this).is(':checked')){ jQuery('.lp_payment_step_next.secondStep').prop('disabled', false); lp_make_checkout_step_active('secondStep'); var urloftermcond=jQuery(".lpcheckouttac").attr('href'); }else{ jQuery('.lp_payment_step_next.secondStep').prop('disabled', true); lp_make_checkout_step_passive('secondStep'); }}); jQuery(document).on('click','button.lp_payment_step_next.secondStep', function(){ jQuery('.lp-checkout-steps .firstStep').addClass('completed'); jQuery('button.lp_payment_step_next.thirdStep').css("display", "block"); jQuery(this).addClass('thirdStep'); jQuery(this).removeClass('secondStep'); jQuery(this).prop("type", "submit"); }); jQuery(document).on('click', 'button.lp_payment_step_next.thirdStep', function(){ jQuery('.lp-checkout-steps .secondStep').addClass('completed'); }); jQuery('#print-section-receipt').click(function(){ var printContents=document.getElementById('printarea').innerHTML; var originalContents=document.body.innerHTML; document.body.innerHTML=printContents; window.print(); document.body.innerHTML=originalContents; location.reload(); }); jQuery('input[name=lp_checkbox_coupon]').on('click', function(){ jQuery(this).toggleClass('active'); if(jQuery(this).hasClass('active')){ lp_make_couponsfields_active(); }else{ lp_make_couponsfields_passive(); lp_reset_mincart_checkout_form_data(); jQuery('li.checkout_discount_val').remove(); }}); var $currHeight=jQuery(window).height(); var $currDivHeight=jQuery('.lp_notification_wrapper').height(); $currHeight=$currHeight - $currDivHeight; var $currHeight=$currHeight+'px'; jQuery('.lp_notification_wrapper').css({"top":$currHeight}); jQuery(window).resize(function(){ var $currHeight=jQuery(window).height(); var $currDivHeight=jQuery('.lp_notification_wrapper').height(); $currHeight=$currHeight - $currDivHeight; var $currHeight=$currHeight+'px'; jQuery('.lp_notification_wrapper').css({"top":$currHeight}); }); jQuery("#menu-toggle").click(function(e){ e.preventDefault(); if(jQuery(window).width() > 767){ jQuery("#wrapper").toggleClass("active"); }}); jQuery('.lp-dot-extra-buttons').click(function(e){ jQuery(this).find(".lp-user-menu").toggleClass("main"); }); jQuery('p#reply-title').on('click', function(event){ event.preventDefault(); var thiss=jQuery(this); if(thiss.hasClass('active')){ jQuery(this).removeClass('active'); jQuery(this).next('#lp-ad-click-inner').slideUp(); jQuery(this).next('#lp-ad-click-innerm').slideUp(); }else{ jQuery(this).addClass('active'); jQuery(this).next('#lp-ad-click-inner').slideDown(); jQuery(this).next('#lp-ad-click-innerm').slideDown(); };}); var TargetHeight=jQuery('.lp-inbox-outer').height(); jQuery('.user-recent-listings-inner .padding-0:first').height(TargetHeight+'px'); var TargetHeight=jQuery('.lp-left-panel-height').height(), TargetHeight=TargetHeight+100; jQuery('#click-search-view').on('click', function(){ $this=jQuery(this); jQuery('.lp-search-section-header-view').toggleClass('active-section-header-view'); }); jQuery(document).on('click', 'button.secondStep', function(){ }); jQuery('button.lp_see_more_activities').on('click', function(){ $this=jQuery(this); $thisval=$this.text(); $thisReplace=$this.data('replacetext'); $this.toggleClass('active'); jQuery('div.lp_hid_this_activity').slideToggle(); $this.text($thisReplace); $this.data('replacetext', $thisval); }); var foldSettings={ easing: 'linear', duration: 1000, size: 5, horizFirst: false, } jQuery('a.lp_preview_this_invoice, .lp_right_preview_this_invoice').on('click', function(e){ var $this=jQuery(this); $inoviceno=$this.closest('.lp-listing-outer-container').data('inoviceno'); $date=$this.closest('.lp-listing-outer-container').data('date'); $amount=$this.closest('.lp-listing-outer-container').data('amount'); $amountOnly=$this.closest('.lp-listing-outer-container').data('orprice'); $tax=$this.closest('.lp-listing-outer-container').data('tax'); $method=$this.closest('.lp-listing-outer-container').data('method'); $plan=$this.closest('.lp-listing-outer-container').data('plan'); $duration=$this.closest('.lp-listing-outer-container').data('duration'); $listTitle=$this.closest('.lp-listing-outer-container').data('listtitle'); $fullAmount=$amount; if($this.hasClass('lp_preview_this_invoice')){ jQuery('div.lp_popup_preview_invoice .lppopinvoice').text($inoviceno); jQuery('div.lp_popup_preview_invoice .lppopdate').text($date); jQuery('div.lp_popup_preview_invoice .lppopsubamount').text($amount); jQuery('div.lp_popup_preview_invoice .lppopamount').text($amount); jQuery('div.lp_popup_preview_invoice .lppoptaxprice').text($tax); jQuery('div.lp_popup_preview_invoice .lppopplanprice').text($amountOnly); jQuery('div.lp_popup_preview_invoice .lppoplist').text($listTitle); jQuery('#lpinvoiceforpdf .lppopinvoice').text($inoviceno); jQuery('#lpinvoiceforpdf .lppopdate').text($date); jQuery('#lpinvoiceforpdf .lppopamount').text($amount); jQuery('#lpinvoiceforpdf .lllistname').text($listTitle); jQuery('#lpinvoiceforpdf .lppopamountqqq').text($tax); jQuery('#lpinvoiceforpdf .lppopamountwww').text($fullAmount); if($method=="wire"){ $imgSrc=jQuery('p.lp-pay-with img').data('srcwire'); jQuery('p.lp-pay-with img').attr('src', $imgSrc); }else if($method=="stripe"){ $imgSrc=jQuery('p.lp-pay-with img').data('srcstripe'); jQuery('p.lp-pay-with img').attr('src', $imgSrc); }else if($method=="paypal"){ $imgSrc=jQuery('p.lp-pay-with img').data('srcpaypal'); jQuery('p.lp-pay-with img').attr('src', $imgSrc); } jQuery('div.lp_popup_preview_invoice .lppopmethod').text($method); jQuery('div.lp_popup_preview_invoice .lppopplan').text($plan); jQuery('div.lp_popup_preview_invoice .lppopduration').text($duration); jQuery('#lpinvoiceforpdf .lppopmethod').text($method); jQuery('#lpinvoiceforpdf .lppopplan').text($plan); jQuery('#lpinvoiceforpdf .lppopduration').text($duration); jQuery("div.lp_popup_preview_invoice").toggle("fold", foldSettings); $this.closest('.lp-listing-outer-container').find('.lp_right_preview_this_invoice input').prop('checked', true); e.preventDefault(); } if($this.hasClass('lp_right_preview_this_invoice')||$this.hasClass('lp_preview_this_invoice')){ jQuery('div.lp_right_preview_invoice .lppopinvoice').text($inoviceno); jQuery('div.lp_right_preview_invoice .lppopdate').text($date); jQuery('div.lp_right_preview_invoice .lppopamount').text($amount); jQuery('div.lp_right_preview_invoice .lppopplanprice').text($amountOnly); jQuery('div.lp_right_preview_invoice .lppoptaxprice').text($tax); jQuery('div.lp_right_preview_invoice .lppopmethod').text($method); jQuery('div.lp_right_preview_invoice .lppopplan').text($plan); jQuery('div.lp_right_preview_invoice .lppopduration').text($duration); jQuery('#lpinvoiceforpdf .lppopinvoice').text($inoviceno); jQuery('#lpinvoiceforpdf .lppopdate').text($date); jQuery('#lpinvoiceforpdf .lppopamount').text($amountOnly); jQuery('#lpinvoiceforpdf .lppopmethod').text($method); jQuery('#lpinvoiceforpdf .lppopplan').text($plan); jQuery('#lpinvoiceforpdf .lppopduration').text($duration); }}); jQuery(document).on('click', '.close_invoice_prev', function(e){ $this=jQuery(this); jQuery("div.lp_popup_preview_invoice").toggle("fold", foldSettings); e.preventDefault(); }); jQuery('button.lp-let-start-btn').on('click', function(){ jQuery('#modal-lp-submit-ad').modal('toggle'); jQuery('.lp-ad-step-two').toggle('fold', foldSettings, function(){ jQuery("html, body").animate({ scrollTop: jQuery(document).height()-jQuery(window).height() }); }); return false; }); jQuery('button.lp-cancle-btn').on('click', function(e){ jQuery('.lp-ad-step-two').toggle('fold', foldSettings); jQuery('.lp_campaign_preview').hide(300); jQuery('.lp_selected_active_ad').show(300); jQuery('.lp_campaign_invoice_pmethod').hide(300); e.preventDefault(); }); jQuery('input[name="lpadsoftype[]"]').on('click', function(){ $this=jQuery(this); adsduration_pd=''; lp_make_campaign_paybutton_active(); $newprice=0; if($this.is(":checked")){ preview=$this.data('preview'); jQuery('img.lp-preview-img-tag').attr('src', preview); jQuery('.lp_campaign_invoice_pmethod').show(300); jQuery('.lp_selected_active_ad').hide(300); $price=$this.data('price'); $prevPrice=''; if(jQuery('#lp-new-ad-compaignForm').data('type')=="adsperclick"){ $prevPrice=jQuery('input[name="adsprice_pc"]').val(); }else{ $prevPrice=jQuery('input[name="ads_price"]').val(); } if(jQuery('form#lp-new-ad-compaignForm').data('type')=="adsperclick"){ $newprice=$prevPrice; jQuery('input[name=ads_price]').val($newprice); }else if(jQuery('form#lp-new-ad-compaignForm').data('type')=="adsperduration"){ if(jQuery('input[name=adsduration_pd]').val()==""){}else{ adsduration_pd=jQuery('input[name=adsduration_pd]').val(); jQuery('input[name="lpadsoftype[]"]:checked').each(function(){ $thisAd=jQuery(this).data('price'); $newprice1=parseFloat(adsduration_pd) * parseFloat($thisAd); $newprice=parseFloat($newprice)+parseFloat($newprice1); $newprice=$newprice.toFixed(2); }); jQuery('input[name=ads_price]').val($newprice); }} jQuery('.lp_payment_methods_ads').show(300); if($this.val()=="lp_random_ads"){ jQuery('.lp-invoices-all-stats li.spotlight span i.fa-check-circle').removeClass('lp-gray-this-ccircle'); } if($this.val()=="lp_top_in_search_page_ads"){ jQuery('.lp-invoices-all-stats li.searchpage span i.fa-check-circle').removeClass('lp-gray-this-ccircle'); } if($this.val()=="lp_detail_page_ads"){ jQuery('.lp-invoices-all-stats li.detailpage span i.fa-check-circle').removeClass('lp-gray-this-ccircle'); }}else{ $price=$this.data('price'); $prevPrice=''; if(jQuery('#lp-new-ad-compaignForm').data('type')=="adsperclick"){ $prevPrice=jQuery('input[name="adsprice_pc"]').val(); }else{ $prevPrice=jQuery('input[name="ads_price"]').val(); } if(jQuery('form#lp-new-ad-compaignForm').data('type')=="adsperclick"){ $newprice=$prevPrice; jQuery('input[name=ads_price]').val($newprice); }else if(jQuery('form#lp-new-ad-compaignForm').data('type')=="adsperduration"){ if(jQuery('input[name=adsduration_pd]').val()==""){}else{ adsduration_pd=jQuery('input[name=adsduration_pd]').val(); jQuery('input[name="lpadsoftype[]"]:checked').each(function(){ $thisAd=jQuery(this).data('price'); $newprice1=parseFloat(adsduration_pd) * parseFloat($thisAd); $newprice=parseFloat($newprice) + parseFloat($newprice1); $newprice=$newprice.toFixed(2); }); jQuery('input[name=ads_price]').val($newprice); }} if($this.val()=="lp_random_ads"){ jQuery('.lp-invoices-all-stats li.spotlight span i.fa-check-circle').addClass('lp-gray-this-ccircle'); } if($this.val()=="lp_top_in_search_page_ads"){ jQuery('.lp-invoices-all-stats li.searchpage span i.fa-check-circle').addClass('lp-gray-this-ccircle'); } if($this.val()=="lp_detail_page_ads"){ jQuery('.lp-invoices-all-stats li.detailpage span i.fa-check-circle').addClass('lp-gray-this-ccircle'); }} jQuery('.lp-invoices-all-stats li.budget span').text($newprice); jQuery('.lp-invoices-all-stats li.duration span').text(adsduration_pd); jQuery('.lp-invoices-all-stats li.subamount span').text($newprice); jQuery('.lp-invoices-all-stats li.lp-total-amount-count span').text($newprice); }); jQuery("input[name=adsduration_pd]").keyup(function(){ $thisval=jQuery(this).val(); jQuery('input[name=ads_days]').val($thisval); $newprice=0; jQuery('input[name="lpadsoftype[]"]:checked').each(function(){ $thisAd=jQuery(this).data('price'); $newprice1=parseFloat($thisval) * parseFloat($thisAd); $newprice=parseFloat($newprice) + parseFloat($newprice1); $newprice=$newprice.toFixed(2); }); jQuery('input[name=ads_price]').val($newprice); jQuery('.lp-invoices-all-stats li.budget span').text($thisval); jQuery('.lp-invoices-all-stats li.subamount span').text($newprice); jQuery('.lp-invoices-all-stats li.lp-total-amount-count span').text($newprice); }); jQuery('button.lp-exist-preview').on('click',function(){ jQuery('.lp_campaign_preview').hide(300); jQuery('.lp_selected_active_ad').hide(300); jQuery('.lp_campaign_invoice_pmethod').show(300); }); jQuery('button.lp_campaign_paynow').on('click', function(){ jQuery('.lp_campaign_preview').hide(300); jQuery('.lp_campaign_invoice_pmethod').show(300); jQuery(this).addClass('startpayforcampaignsss'); }); jQuery(document).on('click', 'button.startpayforcampaignsss', function(e){ jQuery(this).addClass('startpayforcampaignsssNext'); jQuery('.lp-select-payement-outer.lp_payment_methods_ads').show(300); }); jQuery("input[name=adsprice_pc]").keyup(function(){ $thisval=jQuery(this).val(); if(jQuery("li.taxpricein")[0]){ if(jQuery.trim($thisval)==''){}else{ $taxVal=jQuery('li.taxpricein h5 span').text(); $taxVal=parseInt($taxVal); $taxVal=$taxVal/100; $taxVal=$taxVal*$thisval; $taxVal=$taxVal.toFixed(2); $thisval=parseFloat($taxVal) + parseFloat($thisval); }} jQuery('.lp-invoices-all-stats li.budget span').text($thisval); jQuery('.lp-invoices-all-stats li.duration span').text(adsduration_pd); jQuery('.lp-invoices-all-stats li.subamount span').text($thisval); jQuery('.lp-invoices-all-stats li.lp-total-amount-count span').text($thisval); lp_make_campaign_paybutton_active(); }); jQuery("input[name=adsduration_pd]").keyup(function(){ lp_make_campaign_paybutton_active(); }); jQuery('.lp-search-listing-camp').on('change', function (){ lp_make_campaign_paybutton_active(); }); }); jQuery(document).ready(function(){ jQuery('.lp-claim-plan-btn').click(function(){ $sPlanID=jQuery('input[name=plan_id]:checked').val(); jQuery('input[name=lp_claimed_plan]').val($sPlanID); jQuery('.lp-claim-plan-container').addClass('active'); jQuery('.lp-claim-plans').addClass('active'); }); }); jQuery(document).ready(function(){ jQuery('.lp-confi-bottom-bar').click(function(){ jQuery('.lp_confirmation').slideToggle(700); jQuery('.unhidebar-section').slideToggle(700); }); jQuery('.unhidebar-section').click(function(){ jQuery('.lp_confirmation').slideToggle(700); jQuery('.unhidebar-section').slideToggle(700); }); jQuery('.lp-filter-search-listing').click(function(){ jQuery('.lp-dash-search-stats-inner').slideToggle(400); }); }); jQuery(window).resize(function(){ if(jQuery(window).width()<768){ jQuery('.lp-dashboard-new').removeClass('active'); }}); jQuery(document).ready(function (){ jQuery('.lp-cross-suces-layout').click(function(){ jQuery('.lp-lead-success-msg-outer').fadeOut('700'); }); jQuery('.lp-lead-radio-container input[type=radio]').click(function (){ jQuery('.lp-lead-radio-container input[type=radio]:not(:checked)').parent().removeClass("active-radio"); jQuery('.lp-lead-radio-container input[type=radio]:checked').parent().addClass("active-radio"); }); jQuery('.lp-lead-check-container input[type=checkbox]').click(function (){ jQuery('.lp-lead-check-container input[type=checkbox]:not(:checked)').parent().removeClass("active-checkbox"); jQuery('.lp-lead-check-container input[type=checkbox]:checked').parent().addClass("active-checkbox"); }); jQuery('input[type="range"].lp-range-slide').change(function (){ var val=(jQuery(this).val() - jQuery(this).attr('min')) / (jQuery(this).attr('max') - jQuery(this).attr('min')); jQuery(this).css('background-image', '-webkit-gradient(linear, left top, right top, ' + 'color-stop(' + val + ', #b3c0ce), ' + 'color-stop(' + val + ', #eef2f4)' + ')' ); }); if(jQuery('.datetimepicker1').length!=0){ jQuery('.datetimepicker1').datetimepicker({ format: 'LT' }); } if(jQuery('.datetimepicker2').length!=0){ jQuery('.datetimepicker2').datetimepicker({ format: 'L' }); } if(jQuery('.datetimepicker3').length!=0){ jQuery('.datetimepicker3').datetimepicker(); }}); jQuery(document).ready(function(){ jQuery('#listings_checkout_form').on('submit', function(e){ var $this=jQuery(this); method=$this.find('input[name="plan"]:checked').val(); listing_id=$this.find('input[name="listing_id"]:checked').val(); post_title=$this.find('input[name="listing_id"]:checked').data('title'); errormsg=jQuery('input[name="errormsg"]').val(); plan_price=jQuery('span.lp-subtotal-total-price').data('subtotal'); currency=jQuery('input[name=currency]').val(); if(method==='stripe'){ plan_price=plan_price*100; handler.open({ name: post_title, description: "", zipCode: true, amount: plan_price, currency: currency }); e.preventDefault(); } else if(method==='2checkout'){ plan_price=jQuery('span.lp-subtotal-total-price').data('subtotal'); listing_id=$this.find('input[name="listing_id"]:checked').val(); jQuery('#myCCForm input#tprice').val(plan_price); jQuery('#myCCForm input#listing_id').val(listing_id); jQuery("button.lp-2checkout-modal").trigger('click'); e.preventDefault(); }}); jQuery('.lp-new-ad-compaign .lp-invoice-number input.radio_checked').on('click', function(e){ $this=jQuery(this); lp_make_campaign_paybutton_active(); $adType=$this.closest('.lp-listing-outer-container').data('mode'); $clicks=$this.closest('.lp-listing-outer-container').data('clicks'); $mode=$this.closest('.lp-listing-outer-container').data('mode'); $budget=$this.closest('.lp-listing-outer-container').data('budget'); $credit=$this.closest('.lp-listing-outer-container').data('credit'); $currency=$this.closest('.lp-listing-outer-container').data('currency'); $packeg0=$this.closest('.lp-listing-outer-container').data('packeg0'); $packeg1=$this.closest('.lp-listing-outer-container').data('packeg1'); $packeg2=$this.closest('.lp-listing-outer-container').data('packeg2'); $method=$this.closest('.lp-listing-outer-container').data('method'); $duration=$this.closest('.lp-listing-outer-container').data('duration'); if($adType=="adsperclick"){ jQuery('#lp-ad-click-inner .lp-total-clicks-inner h4').html(''); jQuery('#lp-ad-click-innerr .facmount').html(''); jQuery('#lp-ad-click-innerr .faccredit').html(''); jQuery('#lp-ad-click-inner .lp-total-clicks-inner h4').html($clicks); jQuery('#lp-ad-click-innerr .facmount').html($budget + $currency); if($credit){ jQuery('#lp-ad-click-innerr .faccredit').html($credit + $currency); }else{ jQuery('#lp-ad-click-innerr .faccredit').html($budget + $currency); }}else{ jQuery('#lp-ad-click-innerr .lp-ad-payment-duration h5').html(''); jQuery('#lp-ad-click-innerr .lp-ad-payment-duration h5').html($duration); jQuery('#lp-ad-click-innerr .lp-ad-payment-duration h5').html($duration); jQuery('#lp-ad-click-innerr .lp-ad-payment-price h5').html(''); jQuery('#lp-ad-click-innerr .lp-ad-payment-price h5').html($budget); } jQuery('#lp-ad-click-innerr .lp-ad-all-attached-packages').html(''); jQuery('#lp-ad-click-innerr .lp-ad-payment-method h5').html(''); if($packeg0){ jQuery('#lp-ad-click-innerr .lp-ad-all-attached-packages').append(jQuery('
  • '+$packeg0+'
  • ')); } if($packeg1){ jQuery('#lp-ad-click-innerr .lp-ad-all-attached-packages').append(jQuery('
  • '+$packeg1+'
  • ')); } if($packeg2){ jQuery('#lp-ad-click-innerr .lp-ad-all-attached-packages').append(jQuery('
  • '+$packeg2+'
  • ')); } jQuery('#lp-ad-click-innerr .lp-ad-payment-method h5').html($method); }); jQuery('button.lp-add-new-btn').on('click', function(){ jQuery('.lp-blank-section').hide(300); }); jQuery('#modal-lp-submit-ad button.lp-btn-close, .lp-ad-step-two button.lp-cancle-btn').on('click', function(){ jQuery('.lp-blank-section').show(300); }); }); function lp_show_mini_subtotal(){ var $tax=jQuery('#listings_checkout_form input[name=listing_id]:checked').data('taxenable'); var $taxRate=jQuery('#listings_checkout_form input[name=listing_id]:checked').data('taxrate'); var $method=jQuery('#listings_checkout_form input[name=plan]:checked').val(); var $price=jQuery('#listings_checkout_form input[name=listing_id]:checked').data('planprice'); var $orgPrice=$price; var $orgPrice=parseFloat($orgPrice).toFixed(2); var $planID=jQuery('#listings_checkout_form input[name=listing_id]:checked').data('planid'); var $listingID=jQuery('#listings_checkout_form input[name=listing_id]:checked').val(); var $lpRecurring=jQuery('#listings_checkout_form .lp-onoff-switch-checkbox .switch-checkbox-label .switch-checkbox-label input:checked').val(); var $taxPrice=''; var $currencyPos=jQuery('#listings_checkout_form').data('currencypos'); var $currencySym=jQuery('#listings_checkout_form').data('currencysymbol'); if($tax=="1"){ $taxPrice=($taxRate/100)*$price; $price=parseFloat($price) + parseFloat($taxPrice); $taxPrice=parseFloat($taxPrice).toFixed(2); } $price=parseFloat($price).toFixed(2); jQuery('span.lp-subtotal-plan').text(''); jQuery('span.lp-subtotal-price').text(''); jQuery('span.lp-subtotal-taxamount').text(''); jQuery('span.lp-subtotal-price').text(''); jQuery('span.lp-subtotal-p-price').text(''); jQuery('span.lp-subtotal-total-price').text(''); jQuery('span.lp-subtotal-plan').text(jQuery('#listings_checkout_form input[name=listing_id]:checked').data('title')); lp_add_checkout_data_fields($listingID, $planID, $price, $lpRecurring, $method); switch($currencyPos){ case('left'): jQuery('span.lp-subtotal-p-price').text($currencySym+$orgPrice); jQuery('span.lp-subtotal-price').text($currencySym+$price); jQuery('span.lp-subtotal-taxamount').text($currencySym+$taxPrice); jQuery('span.lp-subtotal-total-price').text($currencySym+$price); jQuery('span.lp-subtotal-total-price').attr('data-subtotal',$price); break; case('right'): jQuery('span.lp-subtotal-p-price').text($orgPrice+$currencySym); jQuery('span.lp-subtotal-price').text($price+$currencySym); jQuery('span.lp-subtotal-taxamount').text($taxPrice+$currencySym); jQuery('span.lp-subtotal-total-price').text($price+$currencySym); jQuery('span.lp-subtotal-total-price').attr('subtotal',$price); break; default: jQuery('span.lp-subtotal-p-price').text($currencySym+$orgPrice); jQuery('span.lp-subtotal-price').text($currencySym+$price); jQuery('span.lp-subtotal-taxamount').text($currencySym+$taxPrice); jQuery('span.lp-subtotal-total-price').text($currencySym+$price); jQuery('span.lp-subtotal-total-price').attr('datasubtotal',$price); } jQuery('.lp-checkout-coupon-outer').css('display', 'block'); } function lp_show_recurring_switch(){ var $sPlan=jQuery('input[name=plan]:checked').val(); if($sPlan=="stripe"||$sPlan=="paypal"){ jQuery('.lp-checkout-recurring-wrap').css('display', 'block'); }} function lp_add_checkout_data_fields(listingID, planID, price, recurring, method){ var $tax=jQuery('#listings_checkout_form input[name=listing_id]:checked').data('taxenable'); jQuery('input[name=post_id]').val(listingID); jQuery('input[name=method]').val(method); if($tax=='1'){ jQuery('input[name=listings_tax_price]').val(price); } jQuery('input[name=prc_plan]').val(planID); jQuery('input[name=lprecurring]').val(recurring); } function lp_make_couponsfields_active(){ jQuery('input.coupon-text-field').prop('disabled', false); jQuery('button.coupon-apply-bt').prop('disabled', false); } function lp_make_couponsfields_passive(){ jQuery('input.coupon-text-field').prop('disabled', true); jQuery('button.coupon-apply-bt').prop('disabled', true); } function lp_add_checkout_data_fields_in_form(listingID, post_title, planID, price, $tax, $taxRate){ jQuery('input[name=plan_price]').val(price); jQuery('input[name=post_title]').val(post_title); jQuery('input[name=listings_id]').val(listingID); jQuery('input[name=post_id]').val(listingID); jQuery('input[name=plan_id]').val(planID); if($tax){ taxprice=($taxRate/100)*price; taxprice=taxprice.toFixed(2); jQuery('input[name="listings_tax_price"]').val(taxprice); } lp_update_date_in_mini_cart(price, $tax, $taxRate); } function lp_update_date_in_mini_cart($price, $tax, $taxRate){ var $currencyPos=jQuery('#listings_checkout_form').data('currencypos'); var $currencySym=jQuery('#listings_checkout_form').data('currencysymbol'); var $orgPrice=$price; var $orgPrice=parseFloat($orgPrice).toFixed(2); var $taxPrice=''; var $currencyPos=jQuery('#listings_checkout_form').data('currencypos'); var $currencySym=jQuery('#listings_checkout_form').data('currencysymbol'); if($tax=="1"){ $taxPrice=($taxRate/100)*$price; $price=parseFloat($price) + parseFloat($taxPrice); $price=parseFloat($price).toFixed(2); $taxPrice=parseFloat($taxPrice).toFixed(2); } switch($currencyPos){ case('left'): jQuery('span.lp-subtotal-price').text($currencySym+$price); jQuery('span.lp-subtotal-taxamount').text($currencySym+$taxPrice); jQuery('span.lp-subtotal-total-price').text($currencySym+$price); jQuery('span.lp-subtotal-total-price').attr('data-subtotal',$price); break; case('right'): jQuery('span.lp-subtotal-price').text($price+$currencySym); jQuery('span.lp-subtotal-taxamount').text($taxPrice+$currencySym); jQuery('span.lp-subtotal-total-price').text($price+$currencySym); jQuery('span.lp-subtotal-total-price').attr('data-subtotal',$price); break; default: jQuery('span.lp-subtotal-p-price').text($currencySym+$orgPrice); jQuery('span.lp-subtotal-price').text($currencySym+$price); jQuery('span.lp-subtotal-taxamount').text($currencySym+$taxPrice); jQuery('span.lp-subtotal-total-price').text($currencySym+$price); jQuery('span.lp-subtotal-total-price').attr('data-subtotal',$price); }} function lp_reset_mincart_checkout_form_data(){ var $price=jQuery('input[name=listing_id]:checked').data('planprice'); var $listingID=jQuery('input[name=listing_id]:checked').val(); var $post_title=jQuery('input[name=listing_id]:checked').data('title'); var $planID=jQuery('input[name=listing_id]:checked').data('planid'); var $tax=jQuery('input[name=listing_id]:checked').data('taxenable'); var $taxRate=jQuery('input[name=listing_id]:checked').data('taxrate'); lp_add_checkout_data_fields_in_form($listingID, $post_title, $planID, $price, $tax, $taxRate); } function lp_make_checkout_step_active($stepname){ jQuery('.lp_payment_steps_area li.'+$stepname+'').addClass('current'); } function lp_make_checkout_step_passive($stepname){ jQuery('.lp_payment_steps_area li.'+$stepname+'').removeClass('current'); } function lp_make_campaign_paybutton_active(){ var selected_option=jQuery('.lp-search-listing-camp').val(); var atLeastOnePlaceAd=jQuery('input[name="lpadsoftype[]"]:checked').length > 0; var atLeastOneMethodAd=jQuery('input[name="method"]:checked').length > 0; var adPriceField=1; var adDurationField=1; if(jQuery('input[name="adsduration_pd"]').length > 0){ adDurationField=jQuery('input[name="adsduration_pd"]').val(); } if(jQuery('input[name="adsprice_pc"]').length > 0){ adPriceField=jQuery('input[name="adsprice_pc"]').val(); } if(selected_option!=''&&selected_option!='0'&&atLeastOnePlaceAd!=''&&atLeastOnePlaceAd!='0'&&atLeastOneMethodAd!=''&&atLeastOneMethodAd!='0'&&adDurationField!=''&&adDurationField!='0'&&adPriceField!=''&&adPriceField!='0'){ jQuery('button.lp_campaign_paynow').attr('disabled', false); jQuery('button.lp_campaign_paynow').attr('type', 'submit'); }else{ jQuery('button.lp_campaign_paynow').attr('disabled', true); jQuery('button.lp_campaign_paynow').attr('type', 'button'); }} jQuery(document).on('click', '.show-loop-map-popup', function (e){ e.preventDefault(); if(jQuery('#grid-show-popup').is('.md-show')){ }else{ jQuery('#grid-show-popup').modal({ show: 'true' }); jQuery('#grid-show-popup').addClass('md-show'); } var $this=jQuery(this), LAT=$this.data('lat'), LNG=$this.data('lng'), LPpostID=$this.data('lid'); jQuery.ajax({ url: ajax_search_term_object.ajaxurl, data: { 'action':'show_map_pop_cb', 'LPpostID':LPpostID }, success:function(data){ jQuery('#grid-show-popup .grid-show-popup').html(data); var markers=false; $mtoken=jQuery('#page').data("mtoken"); $siteURL=jQuery('#page').data("site-url"); $lat=LAT; $lan=LNG; if($mtoken!=''){ L.mapbox.accessToken=$mtoken; map=L.mapbox.map('quickmap'+LPpostID, 'mapbox.streets'); }else{ var map=new L.Map('quickmap'+LPpostID, {center: new L.LatLng($lat,$lan), zoom: 14}); var googleLayer=new L.Google('ROADMAP'); map.addLayer(googleLayer); } map.setView([$lat,$lan], 14); markers=new L.MarkerClusterGroup(); var markerLocation=new L.LatLng($lat, $lan); var CustomHtmlIcon=L.HtmlIcon.extend({ options:{ html:"
    ", }}); var customHtmlIcon=new CustomHtmlIcon(); var marker=new L.Marker(markerLocation, {icon: customHtmlIcon}).bindPopup('').addTo(map); markers.addLayer(marker); jQuery('.md-close.widget-map-click').click(function(e){ var loaderImg=jQuery('#grid-show-popup .grid-show-popup').data('loader'); jQuery('#full-overlay').remove(); jQuery('#grid-show-popup .grid-show-popup').html(''); }); }, error: function(errorThrown){ alert(errorThrown); }}); }); jQuery(document).on('click', '.open-multi-rate-box', function (e){ e.preventDefault(); var $this=jQuery(this), targetBox='#'+$this.data('rate-box'); jQuery(targetBox).slideToggle(500); }); jQuery('button.printthisinvoice').click(function(e){ var printContents=document.getElementById('listing-invoices-popup').innerHTML; var originalContents=document.body.innerHTML; document.body.innerHTML=printContents; window.print(); document.body.innerHTML=originalContents; location.reload(); e.preventDefault(); }); jQuery(document).ready(function(){ if(jQuery('.lp-user-listings.active-checkout-listing').length){ jQuery(".lp-user-listings").each(function(index){ if(jQuery(this).hasClass('active-checkout-listing')){}else{ jQuery(this).remove(); }}); }}); jQuery(document).ready(function (){ jQuery('.lp-menu-type-heading').on('click',function (){ jQuery(this).toggleClass('active'); jQuery('.active-menu-toggle').slideUp('slow', function(){ jQuery('.active-menu-toggle').removeClass('active-menu-toggle') }); var getmenutype='.'+jQuery(this).attr("data-target"); jQuery(getmenutype).slideToggle('slow'); }); jQuery('.lp-appview-group-heading').on('click',function(){ jQuery(this).toggleClass('active'); var getmenugroup='.'+jQuery(this).attr("data-target"); jQuery(this).next(getmenugroup).slideToggle('slow'); }) }); jQuery(document).ready(function(){ jQuery('.lp_stats_duration_filter li button').on('click', function(){ jQuery('.lp_stats_duratonBtn').removeClass('active'); jQuery(this).addClass('active'); }); }); jQuery(document).ready(function(){ if(jQuery(window).width()<641){ jQuery('#main_icon').on('click', function(){ jQuery('#main_icon').toggleClass('fa fa-times'); jQuery('#sidebar').toggle(300); }); }}); var Base=function(){};Base.extend=function(a,b){"use strict";var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!==arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a
    ',''].join("");d&&(e=""),b=this.factory.localize(b);var f=['',''+(b?b:"")+"",e,""],g=a(f.join(""));return this.dividers.push(g),g},createList:function(a,b){"object"==typeof a&&(b=a,a=0);var c=new FlipClock.List(this.factory,a,b);return this.lists.push(c),c},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0,{minimumDigits:this.factory.minimumDigits}),this.flip(this.factory.original,!1)},appendDigitToClock:function(a){a.$el.append(!1)},addDigit:function(a){var b=this.createList(a,{classes:{active:this.factory.classes.active,before:this.factory.classes.before,flip:this.factory.classes.flip}});this.appendDigitToClock(b)},start:function(){},stop:function(){},autoIncrement:function(){this.factory.countdown?this.decrement():this.increment()},increment:function(){this.factory.time.addSecond()},decrement:function(){0==this.factory.time.getTimeSeconds()?this.factory.stop():this.factory.time.subSecond()},flip:function(b,c){var d=this;a.each(b,function(a,b){var e=d.lists[a];e?(c||b==e.digit||e.play(),e.select(b)):d.addDigit(b)})}})}(jQuery),function(a){"use strict";FlipClock.Factory=FlipClock.Base.extend({animationRate:1e3,autoStart:!0,callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},classes:{active:"flip-clock-active",before:"flip-clock-before",divider:"flip-clock-divider",dot:"flip-clock-dot",label:"flip-clock-label",flip:"flip",play:"play",wrapper:"flip-clock-wrapper"},clockFace:"HourlyCounter",countdown:!1,defaultClockFace:"HourlyCounter",defaultLanguage:"english",$el:!1,face:!0,lang:!1,language:"english",minimumDigits:0,original:!1,running:!1,time:!1,timer:!1,$wrapper:!1,constructor:function(b,c,d){d||(d={}),this.lists=[],this.running=!1,this.base(d),this.$el=a(b).addClass(this.classes.wrapper),this.$wrapper=this.$el,this.original=c instanceof Date?c:c?Math.round(c):0,this.time=new FlipClock.Time(this,this.original,{minimumDigits:this.minimumDigits,animationRate:this.animationRate}),this.timer=new FlipClock.Timer(this,d),this.loadLanguage(this.language),this.loadClockFace(this.clockFace,d),this.autoStart&&this.start()},loadClockFace:function(a,b){var c,d="Face",e=!1;return a=a.ucfirst()+d,this.face.stop&&(this.stop(),e=!0),this.$el.html(""),this.time.minimumDigits=this.minimumDigits,c=FlipClock[a]?new FlipClock[a](this,b):new FlipClock[this.defaultClockFace+d](this,b),c.build(),this.face=c,e&&this.start(),this.face},loadLanguage:function(a){var b;return b=FlipClock.Lang[a.ucfirst()]?FlipClock.Lang[a.ucfirst()]:FlipClock.Lang[a]?FlipClock.Lang[a]:FlipClock.Lang[this.defaultLanguage],this.lang=b},localize:function(a,b){var c=this.lang;if(!a)return null;var d=a.toLowerCase();return"object"==typeof b&&(c=b),c&&c[d]?c[d]:a},start:function(a){var b=this;b.running||b.countdown&&!(b.countdown&&b.time.time>0)?b.log("Trying to start timer when countdown already at 0"):(b.face.start(b.time),b.timer.start(function(){b.flip(),"function"==typeof a&&a()}))},stop:function(a){this.face.stop(),this.timer.stop(a);for(var b in this.lists)this.lists.hasOwnProperty(b)&&this.lists[b].stop()},reset:function(a){this.timer.reset(a),this.face.reset()},setTime:function(a){this.time.time=a,this.flip(!0)},getTime:function(a){return this.time},setCountdown:function(a){var b=this.running;this.countdown=a?!0:!1,b&&(this.stop(),this.start())},flip:function(a){this.face.flip(!1,a)}})}(jQuery),function(a){"use strict";FlipClock.List=FlipClock.Base.extend({digit:0,classes:{active:"flip-clock-active",before:"flip-clock-before",flip:"flip"},factory:!1,$el:!1,$obj:!1,items:[],lastDigit:0,constructor:function(a,b,c){this.factory=a,this.digit=b,this.lastDigit=b,this.$el=this.createList(),this.$obj=this.$el,b>0&&this.select(b),this.factory.$el.append(this.$el)},select:function(a){if("undefined"==typeof a?a=this.digit:this.digit=a,this.digit!=this.lastDigit){var b=this.$el.find("."+this.classes.before).removeClass(this.classes.before);this.$el.find("."+this.classes.active).removeClass(this.classes.active).addClass(this.classes.before),this.appendListItem(this.classes.active,this.digit),b.remove(),this.lastDigit=this.digit}},play:function(){this.$el.addClass(this.factory.classes.play)},stop:function(){var a=this;setTimeout(function(){a.$el.removeClass(a.factory.classes.play)},this.factory.timer.interval)},createListItem:function(a,b){return['
  • ','','
    ','
    ','
    '+(b?b:"")+"
    ","
    ",'
    ','
    ','
    '+(b?b:"")+"
    ","
    ","
    ","
  • "].join("")},appendListItem:function(a,b){var c=this.createListItem(a,b);this.$el.append(c)},createList:function(){var b=this.getPrevDigit()?this.getPrevDigit():this.digit,c=a(['"].join(""));return c},getNextDigit:function(){return 9==this.digit?0:this.digit+1},getPrevDigit:function(){return 0==this.digit?9:this.digit-1}})}(jQuery),function(a){"use strict";String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},a.fn.FlipClock=function(b,c){return new FlipClock(a(this),b,c)},a.fn.flipClock=function(b,c){return a.fn.FlipClock(b,c)}}(jQuery),function(a){"use strict";FlipClock.Time=FlipClock.Base.extend({time:0,factory:!1,minimumDigits:0,constructor:function(a,b,c){"object"!=typeof c&&(c={}),c.minimumDigits||(c.minimumDigits=a.minimumDigits),this.base(c),this.factory=a,b&&(this.time=b)},convertDigitsToArray:function(a){var b=[];a=a.toString();for(var c=0;cthis.minimumDigits&&(this.minimumDigits=c.length),this.minimumDigits>c.length)for(var d=c.length;d12?c-12:0===c?12:c,a.getMinutes()];return b===!0&&d.push(a.getSeconds()),this.digitize(d)},getSeconds:function(a){var b=this.getTimeSeconds();return a&&(60==b?b=0:b%=60),Math.ceil(b)},getWeeks:function(a){var b=this.getTimeSeconds()/60/60/24/7;return a&&(b%=52),Math.floor(b)},removeLeadingZeros:function(b,c){var d=0,e=[];return a.each(c,function(a,f){b>a?d+=parseInt(c[a],10):e.push(c[a])}),0===d?e:c},addSeconds:function(a){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()+a):this.time+=a},addSecond:function(){this.addSeconds(1)},subSeconds:function(a){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()-a):this.time-=a},subSecond:function(){this.subSeconds(1)},toString:function(){return this.getTimeSeconds().toString()}})}(jQuery),function(a){"use strict";FlipClock.Timer=FlipClock.Base.extend({callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},count:0,factory:!1,interval:1e3,animationRate:1e3,constructor:function(a,b){this.base(b),this.factory=a,this.callback(this.callbacks.init),this.callback(this.callbacks.create)},getElapsed:function(){return this.count*this.interval},getElapsedTime:function(){return new Date(this.time+this.getElapsed())},reset:function(a){clearInterval(this.timer),this.count=0,this._setInterval(a),this.callback(this.callbacks.reset)},start:function(a){this.factory.running=!0,this._createTimer(a),this.callback(this.callbacks.start)},stop:function(a){this.factory.running=!1,this._clearInterval(a),this.callback(this.callbacks.stop),this.callback(a)},_clearInterval:function(){clearInterval(this.timer)},_createTimer:function(a){this._setInterval(a)},_destroyTimer:function(a){this._clearInterval(),this.timer=!1,this.callback(a),this.callback(this.callbacks.destroy)},_interval:function(a){this.callback(this.callbacks.interval),this.callback(a),this.count++},_setInterval:function(a){var b=this;b._interval(a),b.timer=setInterval(function(){b._interval(a)},this.interval)}})}(jQuery),function(a){FlipClock.TwentyFourHourClockFace=FlipClock.Face.extend({constructor:function(a,b){this.base(a,b)},build:function(b){var c=this,d=this.factory.$el.find("ul");this.factory.time.time||(this.factory.original=new Date,this.factory.time=new FlipClock.Time(this.factory,this.factory.original));var b=b?b:this.factory.time.getMilitaryTime(!1,this.showSeconds);b.length>d.length&&a.each(b,function(a,b){c.createList(b)}),this.createDivider(),this.createDivider(),a(this.dividers[0]).insertBefore(this.lists[this.lists.length-2].$el),a(this.dividers[1]).insertBefore(this.lists[this.lists.length-4].$el),this.base()},flip:function(a,b){this.autoIncrement(),a=a?a:this.factory.time.getMilitaryTime(!1,this.showSeconds),this.base(a,b)}})}(jQuery),function(a){FlipClock.CounterFace=FlipClock.Face.extend({shouldAutoIncrement:!1,constructor:function(a,b){"object"!=typeof b&&(b={}),a.autoStart=b.autoStart?!0:!1,b.autoStart&&(this.shouldAutoIncrement=!0),a.increment=function(){a.countdown=!1,a.setTime(a.getTime().getTimeSeconds()+1)},a.decrement=function(){a.countdown=!0;var b=a.getTime().getTimeSeconds();b>0&&a.setTime(b-1)},a.setValue=function(b){a.setTime(b)},a.setCounter=function(b){a.setTime(b)},this.base(a,b)},build:function(){var b=this,c=this.factory.$el.find("ul"),d=this.factory.getTime().digitize([this.factory.getTime().time]);d.length>c.length&&a.each(d,function(a,c){var d=b.createList(c);d.select(c)}),a.each(this.lists,function(a,b){b.play()}),this.base()},flip:function(a,b){this.shouldAutoIncrement&&this.autoIncrement(),a||(a=this.factory.getTime().digitize([this.factory.getTime().time])),this.base(a,b)},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0),this.flip()}})}(jQuery),function(a){FlipClock.DailyCounterFace=FlipClock.Face.extend({showSeconds:!0,constructor:function(a,b){this.base(a,b)},build:function(b){var c=this,d=this.factory.$el.find("ul"),e=0;b=b?b:this.factory.time.getDayCounter(this.showSeconds),b.length>d.length&&a.each(b,function(a,b){c.createList(b)}),this.showSeconds?a(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el):e=2,a(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4+e].$el),a(this.createDivider("Hours")).insertBefore(this.lists[this.lists.length-6+e].$el),a(this.createDivider("Days",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(a,b){a||(a=this.factory.time.getDayCounter(this.showSeconds)),this.autoIncrement(),this.base(a,b)}})}(jQuery),function(a){FlipClock.HourlyCounterFace=FlipClock.Face.extend({constructor:function(a,b){this.base(a,b)},build:function(b,c){var d=this,e=this.factory.$el.find("ul");c=c?c:this.factory.time.getHourCounter(),c.length>e.length&&a.each(c,function(a,b){d.createList(b)}),a(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el),a(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4].$el),b||a(this.createDivider("Hours",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(a,b){a||(a=this.factory.time.getHourCounter()),this.autoIncrement(),this.base(a,b)},appendDigitToClock:function(a){this.base(a),this.dividers[0].insertAfter(this.dividers[0].next())}})}(jQuery),function(a){FlipClock.MinuteCounterFace=FlipClock.HourlyCounterFace.extend({clearExcessDigits:!1,constructor:function(a,b){this.base(a,b)},build:function(){this.base(!0,this.factory.time.getMinuteCounter())},flip:function(a,b){a||(a=this.factory.time.getMinuteCounter()),this.base(a,b)}})}(jQuery),function(a){FlipClock.TwelveHourClockFace=FlipClock.TwentyFourHourClockFace.extend({meridium:!1,meridiumText:"AM",build:function(){var b=this.factory.time.getTime(!1,this.showSeconds);this.base(b),this.meridiumText=this.getMeridium(),this.meridium=a(['"].join("")),this.meridium.insertAfter(this.lists[this.lists.length-1].$el)},flip:function(a,b){this.meridiumText!=this.getMeridium()&&(this.meridiumText=this.getMeridium(),this.meridium.find("a").html(this.meridiumText)),this.base(this.factory.time.getTime(!1,this.showSeconds),b)},getMeridium:function(){return(new Date).getHours()>=12?"PM":"AM"},isPM:function(){return"PM"==this.getMeridium()?!0:!1},isAM:function(){return"AM"==this.getMeridium()?!0:!1}})}(jQuery),function(a){FlipClock.Lang.Arabic={years:"سنوات",months:"شهور",days:"أيام",hours:"ساعات",minutes:"دقائق",seconds:"ثواني"},FlipClock.Lang.ar=FlipClock.Lang.Arabic,FlipClock.Lang["ar-ar"]=FlipClock.Lang.Arabic,FlipClock.Lang.arabic=FlipClock.Lang.Arabic}(jQuery),function(a){FlipClock.Lang.Danish={years:"År",months:"Måneder",days:"Dage",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.da=FlipClock.Lang.Danish,FlipClock.Lang["da-dk"]=FlipClock.Lang.Danish,FlipClock.Lang.danish=FlipClock.Lang.Danish}(jQuery),function(a){FlipClock.Lang.German={years:"Jahre",months:"Monate",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden"},FlipClock.Lang.de=FlipClock.Lang.German,FlipClock.Lang["de-de"]=FlipClock.Lang.German,FlipClock.Lang.german=FlipClock.Lang.German}(jQuery),function(a){FlipClock.Lang.English={years:"Years",months:"Months",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},FlipClock.Lang.en=FlipClock.Lang.English,FlipClock.Lang["en-us"]=FlipClock.Lang.English,FlipClock.Lang.english=FlipClock.Lang.English}(jQuery),function(a){FlipClock.Lang.Spanish={years:"Años",months:"Meses",days:"Días",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.es=FlipClock.Lang.Spanish,FlipClock.Lang["es-es"]=FlipClock.Lang.Spanish,FlipClock.Lang.spanish=FlipClock.Lang.Spanish}(jQuery),function(a){FlipClock.Lang.Finnish={years:"Vuotta",months:"Kuukautta",days:"Päivää",hours:"Tuntia",minutes:"Minuuttia",seconds:"Sekuntia"},FlipClock.Lang.fi=FlipClock.Lang.Finnish,FlipClock.Lang["fi-fi"]=FlipClock.Lang.Finnish,FlipClock.Lang.finnish=FlipClock.Lang.Finnish}(jQuery),function(a){FlipClock.Lang.French={years:"Ans",months:"Mois",days:"Jours",hours:"Heures",minutes:"Minutes",seconds:"Secondes"},FlipClock.Lang.fr=FlipClock.Lang.French,FlipClock.Lang["fr-ca"]=FlipClock.Lang.French,FlipClock.Lang.french=FlipClock.Lang.French}(jQuery),function(a){FlipClock.Lang.Italian={years:"Anni",months:"Mesi",days:"Giorni",hours:"Ore",minutes:"Minuti",seconds:"Secondi"},FlipClock.Lang.it=FlipClock.Lang.Italian,FlipClock.Lang["it-it"]=FlipClock.Lang.Italian,FlipClock.Lang.italian=FlipClock.Lang.Italian}(jQuery),function(a){FlipClock.Lang.Latvian={years:"Gadi",months:"Mēneši",days:"Dienas",hours:"Stundas",minutes:"Minūtes",seconds:"Sekundes"},FlipClock.Lang.lv=FlipClock.Lang.Latvian,FlipClock.Lang["lv-lv"]=FlipClock.Lang.Latvian,FlipClock.Lang.latvian=FlipClock.Lang.Latvian}(jQuery),function(a){FlipClock.Lang.Dutch={years:"Jaren",months:"Maanden",days:"Dagen",hours:"Uren",minutes:"Minuten",seconds:"Seconden"},FlipClock.Lang.nl=FlipClock.Lang.Dutch,FlipClock.Lang["nl-be"]=FlipClock.Lang.Dutch,FlipClock.Lang.dutch=FlipClock.Lang.Dutch}(jQuery),function(a){FlipClock.Lang.Norwegian={years:"År",months:"Måneder",days:"Dager",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.no=FlipClock.Lang.Norwegian,FlipClock.Lang.nb=FlipClock.Lang.Norwegian,FlipClock.Lang["no-nb"]=FlipClock.Lang.Norwegian,FlipClock.Lang.norwegian=FlipClock.Lang.Norwegian}(jQuery),function(a){FlipClock.Lang.Portuguese={years:"Anos",months:"Meses",days:"Dias",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.pt=FlipClock.Lang.Portuguese,FlipClock.Lang["pt-br"]=FlipClock.Lang.Portuguese,FlipClock.Lang.portuguese=FlipClock.Lang.Portuguese}(jQuery),function(a){FlipClock.Lang.Russian={years:"лет",months:"месяцев",days:"дней",hours:"часов",minutes:"минут",seconds:"секунд"},FlipClock.Lang.ru=FlipClock.Lang.Russian,FlipClock.Lang["ru-ru"]=FlipClock.Lang.Russian,FlipClock.Lang.russian=FlipClock.Lang.Russian}(jQuery),function(a){FlipClock.Lang.Swedish={years:"År",months:"Månader",days:"Dagar",hours:"Timmar",minutes:"Minuter",seconds:"Sekunder"},FlipClock.Lang.sv=FlipClock.Lang.Swedish,FlipClock.Lang["sv-se"]=FlipClock.Lang.Swedish,FlipClock.Lang.swedish=FlipClock.Lang.Swedish}(jQuery),function(a){FlipClock.Lang.Chinese={years:"年",months:"月",days:"日",hours:"时",minutes:"分",seconds:"秒"},FlipClock.Lang.zh=FlipClock.Lang.Chinese,FlipClock.Lang["zh-cn"]=FlipClock.Lang.Chinese,FlipClock.Lang.chinese=FlipClock.Lang.Chinese}(jQuery); jQuery.noConflict(); setTimeout(function(){ if(jQuery('body').hasClass('home')){ var currentTOP=jQuery('.header-container header').height(); jQuery('.lp-header-search-wrap').css('top', '-'+currentTOP+'px'); } jQuery(".lp-header-search .lp-header-search-form form, .lp-header-search .lp-header-search-cats ul").show() }, 600); jQuery(function(){ var sidebarHeight=jQuery('.sidebar-top0').height(), DesHeight=sidebarHeight-200, topHeader=jQuery('.lp-listing-top-title-header').height(), minHeight=jQuery('.min-height-class').height(), desHeightT=topHeader+minHeight, minHeightT=sidebarHeight-DesHeight; if(DesHeight >=sidebarHeight){ jQuery('.min-height-class').css('min-height', minHeightT); }else{ minHeightT=sidebarHeight-topHeader+140; jQuery('.min-height-class').css('min-height', minHeightT); }}); jQuery(document).on('click', '.show-number-wrap', function(e){ jQuery(this).find('.show-number').css('display', 'none'); jQuery(this).find('.grind-number').css('display', 'inline-block'); }); jQuery(document).ready(function (e){ jQuery('.claimformtrigger2').click(function (){ jQuery('.planclaim-page-popup').show(); }) jQuery('.lp-review-form-top-multi .lp-review-stars i').click(function (e){ if(jQuery('.lp-review-stars').hasClass('do-not-proceed')){ }else{ e.preventDefault(); jQuery('.lp-review-form-bottom').slideDown(500); var ratingNum=jQuery(this).data('rating'), colorCode='#de9147'; jQuery(this).closest('.lp-review-stars').addClass('do-not-proceed active-rating-avg'+ratingNum); jQuery(this).removeClass('fa-star-o').addClass('fa-star'); jQuery(this).prevAll('.fa-star-o').removeClass('fa-star-o').addClass('fa-star'); jQuery(this).nextAll('.fa-star').removeClass('fa-star-o').addClass('fa-star-o'); if(ratingNum==2){ colorCode='#de9147'; }else if(ratingNum==3||ratingNum==4){ colorCode='#c5de35'; }else if(ratingNum==5){ colorCode='#73cf42'; } jQuery('.lp-multi-rating-ui-wrap > .padding-left-0').each(function (){ jQuery(this).find('.lp-multi-rating-val').val(ratingNum); jQuery(this).find('span:first').each(function (){ jQuery(this).addClass('active-stars-wrap'); jQuery(this).find('.rating-symbol').each(function (index){ if(index < ratingNum){ jQuery(this).find('.rating-symbol-foreground span').css('color', colorCode); jQuery(this).find('.rating-symbol-foreground span').addClass('fa fa-star fa-2x'); jQuery(this).find('.rating-symbol-foreground').css('width', 'auto'); }}); }); }); }}); jQuery('.manage-group-types').click(function (e){ e.preventDefault(); window.location.replace(jQuery(this).data('url')) ; }); jQuery('.show-more-event-content').click(function (e){ var showMore=jQuery(this).data('more'), showLess=jQuery(this).data('less'); if(jQuery(this).hasClass('expanded')){ jQuery('.lp-evnt-content-container p').css('height', '31px'); jQuery(this).text(showMore); jQuery(this).removeClass('expanded'); }else{ jQuery('.lp-evnt-content-container p').height('auto'); jQuery(this).addClass('expanded'); jQuery(this).text(showLess); }}); jQuery(".header-cat-menu").hover(function(){ jQuery(this).find('#menu-category').addClass("show-cat-nav"); }, function(){ jQuery(this).find('#menu-category').removeClass("show-cat-nav"); } ); if(jQuery('#lp-submit-form').length!=0){ var lp_custom_title=''; if(jQuery('#lp_custom_title').length!=0){ lp_custom_title=jQuery('#lp_custom_title').offset().top; } var inputAddress=''; if(jQuery('#inputAddress').length!=0){ inputAddress=jQuery('#inputAddress').offset().top; } var inputCity=''; if(jQuery('.lp-new-cat-wrape label[for="inputTags"]').length!=0){ inputCity=jQuery('.lp-new-cat-wrape label[for="inputTags"]').offset().top; } var inputPhone=''; if(jQuery('#inputPhone').length!=0){ inputPhone=jQuery('label[for="inputPhone"]').offset().top; } var inputWebsite=''; if(jQuery('#inputWebsite').length!=0){ inputWebsite=jQuery('#inputWebsite').offset().top; } var inputCategory=''; if(jQuery('label[for="inputCategory"]').length!=0){ inputCategory=jQuery('label[for="inputCategory"]').offset().top; } var price_status=''; if(jQuery('label[for="price_status"]').length!=0){ price_status=jQuery('label[for="price_status"]').offset().top; } var bussinTop=''; if(jQuery('.bussin-top').length!=0){ bussinTop=jQuery('.bussin-top').offset().top; } var get_media_url=''; if(jQuery('#get_media_url').length!=0){ get_media_url=jQuery('#get_media_url').offset().top; } var inpuFaqsLp=''; if(jQuery('label[for="inpuFaqsLp"]').length!=0){ inpuFaqsLp=jQuery('label[for="inpuFaqsLp"]').offset().top; } var descTop=''; if(jQuery('.description-tip').length!=0){ descTop=jQuery('.description-tip').offset().top; } var postVideo=''; if(jQuery('#postVideo').length!=0){ postVideo=jQuery('#postVideo').offset().top; } var gallTop=''; if(jQuery('.lp-img-gall-upload-section').length!=0){ var gallTop=jQuery('.lp-img-gall-upload-section').offset().top; } var bLogoTop=''; if(jQuery('.b-logo-img-label').length!=0){ var bLogoTop=jQuery('.b-logo-img-label').offset().top; } var featTop=''; if(jQuery('.featured-img-label').length!=0){ featTop=jQuery('.featured-img-label').offset().top; } jQuery(window).scroll(function (e){ var scrollPos=jQuery(window).scrollTop()+400; if(scrollPos > lp_custom_title){ jQuery('.quick-tip-inner').html(jQuery('#lptitle').data('quick-tip')); } if(scrollPos > inputAddress){ jQuery('.quick-tip-inner').html(jQuery('#inputAddress').data('quick-tip')); } if(scrollPos > inputCity){ jQuery('.quick-tip-inner').html(jQuery('#inputCity').data('quick-tip')); } if(scrollPos > inputPhone){ jQuery('.quick-tip-inner').html(jQuery('#inputPhone').data('quick-tip')); } if(scrollPos > inputWebsite){ jQuery('.quick-tip-inner').html(jQuery('#inputWebsite').data('quick-tip')); } if(scrollPos > inputCategory){ jQuery('.quick-tip-inner').html(jQuery('#inputCategory').data('quick-tip')); } if(scrollPos > price_status){ jQuery('.quick-tip-inner').html(jQuery('#price_status').data('quick-tip')); } if(scrollPos > bussinTop){ jQuery('.quick-tip-inner').html(jQuery('.bussin-top').data('quick-tip')); } if(scrollPos > get_media_url){ jQuery('.quick-tip-inner').html(jQuery('#get_media').data('quick-tip')); } if(scrollPos > inpuFaqsLp){ jQuery('.quick-tip-inner').html(jQuery('#inpuFaqsLp').data('quick-tip')); } if(scrollPos > descTop){ jQuery('.quick-tip-inner').html(jQuery('.description-tip').data('quick-tip')); } if(scrollPos > postVideo){ jQuery('.quick-tip-inner').html(jQuery('#postVideo').data('quick-tip')); } if(scrollPos > gallTop){ jQuery('.quick-tip-inner').html(jQuery('.lp-img-gall-upload-section').data('quick-tip')); } if(scrollPos > bLogoTop){ jQuery('.quick-tip-inner').html(jQuery('.b-logo-img-label').data('quick-tip')); } if(scrollPos > featTop){ jQuery('.quick-tip-inner').html(jQuery('.featured-img-label').data('quick-tip')); }}); jQuery('#lp-submit-form input, #lp-submit-form textarea').on('focus', function (e){ var quickTip=jQuery(this).data('quick-tip'); jQuery('.quick-tip-inner').html(quickTip); }); jQuery('select.select2').on('select2:open', function (e){ var quickTip=jQuery(this).data('quick-tip'); jQuery('.quick-tip-inner').html(quickTip); }); } if(jQuery('.page-style2-sidebar').length!=0){ var scrollState=''; var offset=jQuery('.page-style2-sidebar').offset().top-50; jQuery(window).scroll(function (event){ var scroll=jQuery(window).scrollTop(); if(offset >=scroll){ jQuery('.page-style2-sidebar').css({ 'position':'static', 'width': 'auto' }); jQuery('.page-style2-sidebar').removeClass('style2-sidebar-fixed'); scrollState='scrolled'; }else{ var topMAr=10; if(jQuery('.page-style2-sidebar').hasClass('logged-in')){ topMAr=50; } if(scrollState=='scrolled'){ jQuery('.page-style2-sidebar').addClass('style2-sidebar-fixed testClass'); scrollState=''; }} }); } var dateToday=new Date(); jQuery('.discount-date').datepicker({ minDate: dateToday, }); jQuery('.mobile-toggle-filters').click(function (e){ e.preventDefault(); jQuery('.filters-wrap-for-mobile').slideToggle(500); }); jQuery('#lp-review-listing').on('select2:select', function (e){ var reviewStyle=jQuery('#reviews-nav-li').data('style'), listID=jQuery('#lp-review-listing option:selected').val(), authorID=jQuery('.lp-author-nav').data('author'); jQuery('#reviews').find('.author-inner-content-wrap').addClass('content-loading'); jQuery.ajax({ type: 'POST', url: ajax_search_term_object.ajaxurl, data: { 'action': 'author_review_tab_cb', 'reviewStyle': reviewStyle, 'listID':listID, 'authorID': authorID }, success: function(data){ jQuery('#reviews').find('.author-inner-content-wrap').removeClass('content-loading'); jQuery('#reviews').find('.author-inner-content-wrap').html(data); }}); }) jQuery('.lp-author-nav li a').click(function (e){ e.preventDefault(); var $this=jQuery(this), targetID=$this.attr('href'), authorID=jQuery('.lp-author-nav').data('author'), tabType='', reviewStyle='', listingLayout=''; if(targetID=='#reviews'){ tabType='reviews'; var reviewStyle=$this.data('style'); } else if(targetID=='#photos'){ tabType='photos'; } else if(targetID=='#aboutme'){ tabType='aboutme'; } else if(targetID=='#contact'){ tabType='contact'; } else if(targetID=='#mylistings'){ tabType='mylistings'; listingLayout=$this.data('listing-layout'); } jQuery('.lp-author-nav li a.active').removeClass('active'); $this.addClass('active'); jQuery('.author-tab-content .active').removeClass('active').hide(); jQuery(targetID).addClass('active').show(); if($this.hasClass('data-available')){ return false; }else{ jQuery(targetID).find('.author-inner-content-wrap').addClass('content-loading'); jQuery.ajax({ type: 'POST', url: ajax_search_term_object.ajaxurl, data: { 'action': 'author_archive_tabs_cb', 'tabType': tabType, 'reviewStyle': reviewStyle, 'authorID': authorID, 'listingLayout':listingLayout }, success: function(data){ jQuery(targetID).find('.author-inner-content-wrap').removeClass('content-loading'); jQuery(targetID).find('.author-inner-content-wrap').html(data); $this.addClass('data-available'); }}); }}); jQuery('.author-inner-content-wrap .lp-pagination span').click(function (e){ var $this=jQuery(this); var pageNum=jQuery(this).data('pageurl'); jQuery('span.current').removeClass('current'); jQuery('#content-grids').html('').addClass('content-loading'); jQuery.ajax({ type: 'POST', url: ajax_search_term_object.ajaxurl, data: { 'action': 'author_archive_listings_cb', 'pageNum': pageNum, }, success: function(data){ $this.addClass('current'); jQuery('#content-grids').removeClass('content-loading').html(data); }}); }); jQuery('.lp-header-nav-btn button').click(function (e){ if(jQuery('.lp-header-nav-btn').hasClass('active-can-menu')){ jQuery('.lp-header-nav-btn').removeClass('active-can-menu'); jQuery('#menu-categories-menu').css('opacity', '0'); jQuery('#menu-categories-menu').css('transform', 'scale(0)'); }else{ jQuery('#menu-categories-menu').css('opacity', '1'); jQuery('#menu-categories-menu').css('transform', 'scale(1)'); jQuery('.lp-header-nav-btn').addClass('active-can-menu'); }}); jQuery('.browse-imgs').click(function (e){ e.preventDefault(); jQuery('#filer_input2').trigger('click'); }); jQuery('.search-filter-response .loop-switch-class').last().find('.lp-listing').addClass('last'); jQuery('.lp-author-listings-wrap .loop-switch-class').last().find('.lp-listing').addClass('last'); jQuery('.lp-listing-announcement .announcement-wrap').last().addClass('last'); jQuery('.lp-review-form-top-multi .lp-listing-stars, .lp-review-images .browse-imgs, .lp-review-form-top-multi .lp-review-stars').click(function(e){ if(jQuery('.lp-review-form-bottom').hasClass('review-form-opened')){ }else{ jQuery('.lp-review-form-bottom').slideDown(500); jQuery('.lp-review-form-bottom').addClass('review-form-opened'); }}); var topWidgetWrap=jQuery('.lp-widget-inner-wrap').first(); var lastWidgetWrap=jQuery('.lp-widget-inner-wrap').last(); if(topWidgetWrap.hasClass('lp-listing-timings')){ topWidgetWrap.find('.lp-today-timing').addClass('top-border-radius'); }else{ topWidgetWrap.addClass('top-border-radius'); } if(lastWidgetWrap.hasClass('lp-listing-timings')){ lastWidgetWrap.find('.lp-today-timing').addClass('bottom-border-radius'); } else if(lastWidgetWrap.hasClass('singlemap')){ jQuery('.lp-widget-social-links').addClass('bottom-border-radius'); }else{ lastWidgetWrap.addClass('bottom-border-radius'); } jQuery('.lp-dis-code-copy span').click(function (e){ var targetCodeEL=jQuery(this).data('target-code'), targetCodeELC='.'+targetCodeEL; var copyCode=jQuery(targetCodeELC).find('strong.copycode').text(); jQuery(targetCodeELC).find('input.codtopcopy').val(copyCode).select(); document.execCommand ("copy"); jQuery(this).html(' copied').delay(1000).show(500, function(e){ jQuery(targetCodeELC).fadeOut(); jQuery('.code-overlay').fadeOut(); }); }); jQuery('.close-copy-code').click(function (e){ e.preventDefault(); var targetCodeEL=jQuery(this).data('target-code'), targetCodeELC='.'+targetCodeEL; jQuery(targetCodeELC).fadeOut(); jQuery('.code-overlay').fadeOut(); }); jQuery('.more-filters').click(function(e){ jQuery('.lp-header-search-filters .lp-features-filter').toggleClass('add-border'); jQuery('.more-filters-container').slideToggle(); }) function toggleIcon(e){ jQuery(e.target) .prev('.faq-heading') .find(".more-less") .toggleClass('glyphicon-plus glyphicon-minus'); } slickINIT(); if(jQuery('.listing-slider').length!=0){ jQuery('.listing-slider').slick({ infinite: true, slidesToShow: 3, slidesToScroll: 1, prevArrow:"", nextArrow:"", responsive: [ { breakpoint: 768, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true }} ] }); jQuery('.lp-listings .listing-slider').show(); } if(jQuery('.lp-child-cats-tax-slider').length!=0){ var chilCatsLoc=jQuery('.lp-child-cats-tax-slider').data('child-loc'), childCatNum=3; if(chilCatsLoc=='fullwidth'){ childCatNum=5; } if(jQuery('.lp-child-cats-tax-wrap').length > childCatNum){ jQuery('.lp-child-cats-tax-slider').slick({ infinite: true, slidesToShow: childCatNum, slidesToScroll: 1, prevArrow:"", nextArrow:"" }); }} if(jQuery('.lp-locations-slider') .length!=0&&jQuery('.lp-locations-slider .lp-location-box').length > 6){ jQuery('.lp-locations-slider').slick({ infinite: true, slidesToShow: 6, slidesToScroll: 1, nextArrow:"", prevArrow:"", responsive: [ { breakpoint: 480, settings: { arrows: true, centerMode: false, centerPadding: '0px', slidesToShow: 2 }} ] }); } jQuery('.sort-by-filter').hover(function (e){ e.preventDefault(); if(jQuery(this).hasClass('active-tooltip-filter')){ return false; } jQuery('.active-tooltip-filter').find('.sort-filter-inner').fadeOut(200); jQuery('.active-tooltip-filter').removeClass('active-tooltip-filter'); jQuery(this).addClass('active-tooltip-filter'); jQuery(this).find('.sort-filter-inner').fadeIn(200); }) jQuery('body').click(function(e){ if(e.target.id=="header-rated-filter"||e.target.id=="header-reviewed-filter"||e.target.id=="header-viewed-filter") return; if(jQuery('.sort-filter-inner').is(":visible")){ jQuery('.sort-filter-inner').fadeOut(200); } jQuery('.active-tooltip-filter').removeClass('active-tooltip-filter'); }); jQuery('.listing-view-layout ul li a').click(function (e){ e.preventDefault(); var $this=jQuery(this), targetView=''; if($this.hasClass('list')){ targetView='list-style'; } if($this.hasClass('grid')){ targetView='grid-style'; } if(targetView=='grid-style'){ jQuery('.loop-switch-class').removeClass('col-md-12'); jQuery('.loop-switch-class').addClass('col-md-6'); jQuery('.loop-switch-class.listing-style-1').removeClass('col-md-6'); jQuery('.loop-switch-class.listing-style-1').addClass('col-md-4'); jQuery('.lp-listings.active-view').removeClass('list-style'); jQuery('.lp-listings.active-view').addClass('grid-style'); } if(targetView=='list-style'){ jQuery('.loop-switch-class').removeClass('col-md-6'); jQuery('.loop-switch-class.listing-style-1').removeClass('col-md-4'); jQuery('.loop-switch-class').addClass('col-md-12'); jQuery('.lp-listings.active-view').addClass('list-style'); jQuery('.lp-listings.active-view').removeClass('grid-style'); }}); if(jQuery('.lp-listing-slider').length!=0){ var totalSlides=jQuery('.lp-listing-slider').attr('data-totalSlides'), slidesToShow=3; if(totalSlides==1){ slidesToShow=1; } if(totalSlides==2){ slidesToShow=2; } jQuery('.lp-listing-slider').slick({ infinite: true, slidesToShow: slidesToShow, slidesToScroll: 1, prevArrow: "", nextArrow: "", responsive: [ { breakpoint: 480, settings: { arrows: true, centerMode: false, centerPadding: '0px', slidesToShow: 2 }} ] }); jQuery('.lp-listing-slider').show(); } if(jQuery('.listing-review-slider').length!=0){ var totalSlieds=jQuery('.listing-review-slider').attr('data-review-thumbs'); jQuery('.listing-review-slider').slick({ infinite: true, slidesToShow: 4, slidesToScroll: 1, prevArrow: "", nextArrow: "" }); } jQuery('.btn-link-field-toggle').click(function (e){ var dataTargetLink=jQuery(this).data('target-link'); jQuery('.btn-link-target').slideToggle(300); jQuery(this).toggleClass('link-active'); var targetSwitch='input#'+dataTargetLink; jQuery(targetSwitch).val(''); }); jQuery('.review-form-toggle, .lp-listing-review-form h2').click(function(e){ e.preventDefault(); jQuery('.lp-listing-review-form .lp-form-opener').hide(); jQuery('.lp-review-form-bottom').slideToggle(500); jQuery('html,body').animate({ scrollTop: jQuery(".lp-listing-review-form").offset().top -100 }, 'slow'); }); jQuery('.lp-see-menu-btn').click(function (e){ e.preventDefault(); jQuery('html,body').animate({ scrollTop: jQuery(".lp-listing-menuu-wrap").offset().top - 120 }, 'slow'); }) jQuery('.toggle-all-days').click(function(e){ e.preventDefault(); var leftColHeight=jQuery('.min-height-class').height(), timingsIH=jQuery('.lp-listing-timings').height(); jQuery('.lp-today-timing.all-days-timings').slideToggle(200).toggleClass('days-opened'); var lessText=jQuery(this).data('contract'); var moreText=jQuery(this).data('expand'); setTimeout(function(){ var isOpened=jQuery('.lp-today-timing.all-days-timings').is('.days-opened'); if(isOpened===true){ var timingsOH=jQuery('.lp-listing-timings').height(), leftColHeightN=leftColHeight+timingsOH; jQuery('.min-height-class').css('min-height', leftColHeightN+'px'); jQuery('.toggle-all-days').html(' ' + lessText); }else{ var leftColHeightN=leftColHeight-timingsIH; jQuery('.min-height-class').css('min-height', leftColHeightN+'px'); jQuery('.toggle-all-days').html(' '+moreText); }}, 150); }); jQuery('.toggle-additional-details').click(function(e){ e.preventDefault(); jQuery('.additional-detail-hidden').slideToggle(200).toggleClass('details-opened'); var lessText=jQuery(this).data('contract'); var moreText=jQuery(this).data('expand'); var leftColHeight=jQuery('.min-height-class').height(), additoinalIH=jQuery('.lp-listing-additional-details').height(); setTimeout(function(){ var isOpened=jQuery('.additional-detail-hidden').is('.details-opened'); if(isOpened===true){ var additoinalOH=jQuery('.lp-listing-additional-details').height(), leftColHeightN=(leftColHeight+additoinalOH)-360; jQuery('.min-height-class').css('min-height', leftColHeightN+'px'); jQuery('.toggle-additional-details').html(' '+lessText); }else{ var leftColHeightN=(leftColHeight-additoinalIH)+360; jQuery('.min-height-class').css('min-height', leftColHeightN+'px'); jQuery('.toggle-additional-details').html(' '+moreText); }}, 150); }); jQuery('.lp-listing-faqs').on('hidden.bs.collapse', toggleIcon); jQuery('.lp-listing-faqs').on('shown.bs.collapse', toggleIcon); jQuery(document).on('click', '.add-to-fav-v2',function(e){ e.preventDefault() $this=jQuery(this); $this.find('i').addClass('fa-spin fa-spinner'); var val=jQuery(this).data('post-id'); var type=jQuery(this).data('post-type'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data: { 'action': 'listingpro_add_favorite_v2', 'post-id': val, 'type': type, }, success: function(data){ if(data){ if(data.active=='yes'){ $this.find('i').removeClass('fa-spin fa-spinner'); if(data.type=='grid'||data.type=='list'){ $this.find('i').removeClass('fa-heart-o'); $this.find('i').addClass('fa-heart'); }else{ var successText=$this.data('success-text'); $this.find('span').text(successText); $this.html(' '+data.text); } $this.removeClass('add-to-fav-v2'); $this.addClass('remove-fav-v2'); }} }}); }); jQuery(document).on('click', '.remove-fav-v2', function(e){ e.preventDefault(); var val=jQuery(this).data('post-id'); var type=jQuery(this).data('post-type'); jQuery(this).find('i').removeClass('fa-close'); jQuery(this).find('i').addClass('fa-spinner fa-spin'); $this=jQuery(this); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data: { 'action': 'listingpro_remove_favorite_v2', 'post-id': val, 'type':type }, success: function(data){ if(data){ if(data.remove=='yes'){ $this.find('i').removeClass('fa-spin fa-spinner'); if(data.type=='grid'||data.type=='list'){ $this.find('i').addClass('fa-heart-o'); }else{ $this.html(' '+data.text); } if(jQuery('.page-template-template-favourites').length!=0){ $this.closest(".lp-grid-box-contianer").fadeOut(); } $this.removeClass('remove-fav-v2'); $this.addClass('add-to-fav-v2'); }} }}); }); var social=jQuery('.lp-listing-action-btns ul li div.social-icons.post-socials'); var socialOvrly=jQuery('.lp-listing-action-btns ul li .md-overlay'); jQuery('.lp-single-sharing').on('click', function(event){ event.preventDefault(); social.fadeIn(400); if(socialOvrly.hasClass('hide')){ jQuery(socialOvrly).removeClass('hide'); jQuery(socialOvrly).addClass('show'); }else{ jQuery(socialOvrly).removeClass('show'); jQuery(socialOvrly).addClass('hide'); }}); socialOvrly.on('click', function(event){ event.preventDefault(); social.hide(); if(socialOvrly.hasClass('show')){ jQuery(socialOvrly).removeClass('show'); jQuery(socialOvrly).addClass('hide'); }else{ jQuery(socialOvrly).removeClass('hide'); jQuery(socialOvrly).addClass('show'); }}); jQuery(document).on('click' , '.lp-review-right-bottom .review-reaction, .lp-activity-description .review-reaction',function(e){ e.preventDefault(); if(jQuery(this).hasClass('active-now')){ return false; } reviewID=''; ajaxResErr=''; var $this=jQuery(this); $this.addClass('active-now'); reviewID=$this.data('id'), currentVal=$this.data('score'), restype=$this.data('restype'); $this.find('span.react-count').html(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_review_object.ajaxurl, data:{ action:'lp_reviews_interests', interest:currentVal, restype:restype, id:reviewID, }, success: function(res){ if(res.errors=="no"){ ajaxResErr='no'; var newscore=res.newScore; $this.data('score', newscore); $this.find('span.react-count').html(newscore); $this.find('span.react-msg').text(res.statuss).fadeIn(500).delay(2000).fadeOut(500); if(restype=='interesting'){ $this.css({'background-color': '#417cdf', 'color': '#fff'}); $this.find('span.react-count').css({'color': '#fff'}); } else if(restype=='lol'){ $this.css({'background-color': '#ff8e29', 'color': '#fff'}); $this.find('span.react-count').css({'color': '#fff'}); } else if(restype=='love'){ $this.css({'background-color': '#ff2357', 'color': '#fff'}); $this.find('span.react-count').css({'color': '#fff'}); } currentVal=false; }else{ ajaxResErr='yes'; var newscore=res.newScore; $this.find('span.react-count').text(newscore); $this.find('span.react-msg').text(res.statuss).fadeIn(500).delay(2000).fadeOut(500); } $this.removeClass('active-now'); }, error: function(request, error){ alert(error); }}); e.preventDefault(); }); jQuery(document).on('click', '#lp-save-menu', function (e){ e.preventDefault(); var $this=jQuery(this), userID=$this.data('uid'), mTitle=jQuery('#menu-title').val(), mDetail=jQuery('#menu-detail').val(), mOldPrice=jQuery('#menu-old-price').val(), mNewPrice=jQuery('#menu-new-price').val(), mQuoteT=jQuery('#menu-quote-text').val(), mQuoteL=jQuery('#menu-quote-link').val(), mListing=jQuery('#menu-listing').val(), mLink=jQuery('#menu-link').val(), mImage=jQuery('.new-file-upload .frontend-input').val(), mType=jQuery('#menu-type').val(), mGroup=jQuery('#menu-group').val(); if(mImage==''&&jQuery('.new-file-upload .frontend-input-multiple').length!=0){ mImage=jQuery('.new-file-upload .frontend-input-multiple').val(); } if(mListing==''||mListing==null||mListing==0){ jQuery('#select2-menu-listing-container').addClass('error'); }else{ jQuery('#select2-menu-listing-container').removeClass('error'); } if(mTitle==''){ jQuery('#menu-title').addClass('error'); }else{ jQuery('#menu-title').removeClass('error'); } if(mType==''||mType==0||mType==null){ jQuery('select#menu-type').next('.select2-container').addClass('error'); }else{ jQuery('select#menu-type').next('.select2-container').removeClass('error'); } if(mGroup==''||mGroup==0||mGroup==null){ jQuery('select#menu-group').next('.select2-container').addClass('error'); }else{ jQuery('select#menu-group').next('.select2-container').removeClass('error'); } if(mTitle==''||(mType==''&&mType==0||mType==null)||(mGroup==''&&mGroup==0||mGroup==null)||mListing==''||mListing==null||mListing==0){ var dataError=[]; dataError.status='error'; dataError.msg=jQuery('.lp-notifaction-area').data('error-msg'); ajax_success_popup(dataError, $this); return false; } $this.append(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_menu_cb', 'user_id':userID, 'mTitle':mTitle, 'mDetail':mDetail, 'mOldPrice':mOldPrice, 'mNewPrice':mNewPrice, 'mQuoteT':mQuoteT, 'mQuoteL':mQuoteL, 'mListing':mListing, 'mLink':mLink, 'mImage':mImage, 'mType':mType, 'mGroup':mGroup, }, success: function(res){ ajax_success_popup(res, $this); }, error: function(err){ alert(err); $this.find('i').remove(); }}); }); jQuery('.add-new-open-form').click(function (e){ e.preventDefault(); var targetForm='#'+jQuery(this).data('form')+'-form-toggle'; jQuery(targetForm).slideToggle('fast', function (){ jQuery('html, body').animate({ scrollTop: jQuery(targetForm).offset().top }, 1000, function (){ jQuery('.lp-blank-section').fadeOut(); }); }); }); var targetPlanMetaKey='menu'; if(jQuery('.select2-ajax').length!=0){ targetPlanMetaKey=jQuery('.select2-ajax').data('metakey'); var noResultsText=jQuery('#select2-ajax-noresutls').val(), inputShortText=jQuery('#select2-ajax-tooshort').val(), searchingText=jQuery('#select2-ajax-searching').val(); } jQuery('.select2-ajax').select2({ ajax: { url: ajax_search_term_object.ajaxurl, dataType: 'json', type:'GET', data: function (params){ return { q: params.term, targetPlanMetaKey: targetPlanMetaKey, action: 'select2_ajax_dashbaord_listing' };}, processResults: function(data){ var options=[]; var disabled_opts=false; if(data){ jQuery.each(data, function(index, text){ var disabled_opts=false; if(text[2]=='yes'){ disabled_opts=true; } options.push({ id: text[0], text: text[1], disabled:disabled_opts }); }); } return { results: options };}, cache: true }, minimumInputLength: 3, language: { inputTooShort: function (){ return inputShortText; }, noResults: function (){ return noResultsText; }, searching: function (){ return searchingText; }} }); jQuery('.lp-search-listing-camp').select2({ ajax: { url: ajax_search_term_object.ajaxurl, dataType: 'json', type:'GET', data: function (params){ return { q: params.term, action: 'select2_ajax_dashbaord_listing_camp' }; console.log(params); }, processResults: function(data){ var options=[]; if(data){ jQuery.each(data, function(index, text){ options.push({ id: text[0], text: text[1] }); }); } return { results: options };}, cache: true }, minimumInputLength: 3 }); var uniqueMetaKey='event_id'; var planmetakey='events'; if(jQuery('.select2-ajax-unique').length!=0){ uniqueMetaKey=jQuery('.select2-ajax-unique').data('metakey'); planmetakey=jQuery('.select2-ajax-unique').data('planmetakey'); var noResultsText=jQuery('#select2-ajax-noresutls').val(), inputShortText=jQuery('#select2-ajax-tooshort').val(), searchingText=jQuery('#select2-ajax-searching').val(); } jQuery('.select2-ajax-unique').select2({ ajax: { url: ajax_search_term_object.ajaxurl, dataType: 'json', type:'GET', data: function (params){ return { q: params.term, uniqueMetaKey: uniqueMetaKey, planmetakey: planmetakey, action: 'select2_ajax_dashbaord_listing_unique' };}, processResults: function(data){ var options=[]; if(data){ jQuery.each(data, function(index, text){ var disabled_opts=false; if(text[2]=='yes'){ disabled_opts=true; } options.push({ id: text[0], text: text[1], disabled:disabled_opts }); }); } return { results: options };}, cache: true }, minimumInputLength: 3, language: { inputTooShort: function (){ return inputShortText; }, noResults: function (){ return noResultsText; }, searching: function (){ return searchingText; }} }); jQuery('#ad-announcement-btn').on('click', function (e){ e.preventDefault(); var $this=jQuery(this), userID=$this.data('uid'), annMsg=jQuery('#announcements-message').val(), annBT=jQuery('#announcements-btn-text').val(), annBL=jQuery('#announcements-btn-link').val(), annLI=jQuery('#announcements-listing').val(), annSt=jQuery('#ann-style').find(':selected').val(), annIC=jQuery('#announcements-icon').val(), annType='', annTI=jQuery('#announcements-title').val(); if(annIC!=''){ var annType=jQuery('#announcements-icon').attr('icon-type'); } if(annLI==0||annLI==''||annLI==null){ jQuery('#select2-announcements-listing-container').addClass('error'); }else{ jQuery('#select2-announcements-listing-container').removeClass('error'); } if(annMsg==''){ jQuery('#announcements-message').addClass('error'); }else{ jQuery('#announcements-message').removeClass('error'); } if(annLI==0||annLI==''||annMsg==''||annLI==0||annLI==''||annLI==null){ var dataError=[]; dataError.status='error'; dataError.msg=jQuery('.lp-notifaction-area').data('error-msg'); ajax_success_popup(dataError, $this); $this.find('i').remove(); return false; } if($this.hasClass('processing-ann')){}else{ $this.append(''); $this.addClass('processing-ann'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_announcements_cb', 'user_id':userID, 'annSt':annSt, 'annMsg':annMsg, 'annBT':annBT, 'annBL':annBL, 'annLI':annLI, 'annTI':annTI, 'annIC':annIC, 'annType':annType }, success: function(res){ ajax_success_popup(res, $this); }, error: function(err){ $this.find('i').remove(); }}); }}); jQuery('#ann-style').on('change', function (e){ var $this=jQuery(this), $thisDes=$this.find(':selected').attr('data-des'), $thisTI=$this.find(':selected').attr('data-title'), $thisIC=$this.find(':selected').attr('data-icon'), $thisBT=$this.find(':selected').text(), $thisST=$this.find(':selected').attr('data-st'); jQuery('.announcement-wrap span').text($thisDes); jQuery('#announcements-message').val($thisDes); jQuery('.announcement-wrap a').text($thisBT); jQuery('.announcement-wrap strong').text($thisTI); jQuery('#announcements-btn-text').val($thisBT); jQuery('#announcements-title').val($thisTI); jQuery('.announcement-wrap i').removeClass(); jQuery('.announcement-wrap i').addClass($thisIC); jQuery('.field-desc strong').text($thisDes.length); }) jQuery('.ann-style-wrap span').click(function (e){ var $this=jQuery(this), $thisWrap=$this.closest('.ann-style-wrap'), $thislabel=$this.closest('label'), $thisDes=$this.data('des'), $thisBT=$this.data('bt'); $thisWrap.find('input[name="ann-style"]:checked').removeAttr('checked'); $thisWrap.find('.ann-style-val').val($thislabel.find('input').val()); $thislabel.find('input').attr('checked', true); jQuery('.announcement-wrap span, #announcements-message').text($thisDes); jQuery('.announcement-wrap a').text($thisBT); jQuery('#announcements-btn-text').val($thisBT); }); jQuery(document).on('click', '#lp-save-dis', function(e){ e.preventDefault(); var $this=jQuery(this), userID=$this.data('uid'), disHea=jQuery('#dis-heading').val(), disCod=jQuery('#dis-code').val(), disExpE=jQuery('#dis-expiry-e').val(), disExpS=jQuery('#dis-expiry-s').val(), disBT=jQuery('#dis-btn-text').val(), disBL=jQuery('#dis-btn-link').val(), disLI=jQuery('#dis-listing').val(), disImg=jQuery('.new-file-upload .frontend-input').val(), disOff=jQuery('#dis-off').val(), disDes=jQuery('#dis-description').val(); if(disLI==0||disLI==''||disLI==null){ jQuery('#select2-dis-listing-container').addClass('error'); }else{ jQuery('#select2-dis-listing-container').removeClass('error'); } if(disHea==''){ jQuery('#dis-heading').addClass('error'); }else{ jQuery('#dis-heading').removeClass('error'); } if(disLI==0||disLI==''||disLI==null||disHea==''){ var dataError=[]; dataError.status='error'; dataError.msg=jQuery('.lp-notifaction-area').data('error-msg'); ajax_success_popup(dataError, $this); $this.find('i').removeClass('fa-spin fa-spinner'); return false; } if($this.hasClass('processing-dis')){}else{ $this.addClass('processing-dis'); $this.append(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_discount_cb', 'user_id':userID, 'disHea':disHea, 'disCod':disCod, 'disExpE':disExpE, 'disExpS':disExpS, 'disBT':disBT, 'disBL':disBL, 'disLI':disLI, 'disDes':disDes, 'disOff':disOff, 'disImg':disImg, 'disSta':'active', }, success: function(res){ ajax_success_popup(res, $this); }, error: function(err){ alert(err); $this.find('i').remove(); }}); }}); jQuery(document).on('click', '#lp-save-offer', function(e){ e.preventDefault(); var $this=jQuery(this), userID=$this.data('uid'), offerTitle=jQuery('#offer-title').val(), offerDes=jQuery('#offer-description').val(), offerExp=jQuery('#offer-expriry').val(), offerBT=jQuery('#offer-btn-text').val(), offerBL=jQuery('#offer-btn-link').val(), offerImg=jQuery('#frontend-input').val(), offerLI=jQuery('#offer-listing').val(); if(!jQuery('.btn-link-field-toggle').hasClass('link-active')){ offerBL=''; } $this.append(''); if(offerLI==null||offerLI==''||offerTitle==''||offerExp==''){ jQuery('.ann-err-msg').fadeIn(500).delay(1500).fadeOut(500); $this.find('i').remove(); return false; } jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_offer_cb', 'user_id':userID, 'offerTitle':offerTitle, 'offerDes':offerDes, 'offerExp':offerExp, 'offerBT':offerBT, 'offerBL':offerBL, 'offerLI':offerLI, 'offerImg':offerImg, }, success: function(res){ console.log(res); $this.find('i').removeClass('fa-spin fa-spinner'); $this.find('i').addClass('fa fa-check'); location.reload(); }, error: function(err){ alert(err); $this.find('i').remove(); }}); }); jQuery(document).on('click', '.del-this', function(e){ e.preventDefault(); jQuery('.remove-active').removeClass('remove-active'); jQuery(this).addClass('remove-active'); jQuery('#dashboard-delete-modal').modal('show'); jQuery('.modal-backdrop').hide(); }); jQuery(document).on('click', '.dashboard-confirm-del-btn', function (e){ var $this=jQuery('.remove-active'); if($this.hasClass('del-all-menu')){ var lid=$this.data('lid'), user_id=$this.data('uid'); jQuery(this).append(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'del_all_menu_cb', 'user_id':user_id, 'lid':lid, }, success: function(res){ if(res.status=='success'){ location.reload(); } $this.find('i').removeClass('fa-spin fa-spinner').addClass('fa-trash-o'); }, error: function(err){ console.log(err); $this.find('i').removeClass('fa-spin fa-spinner').addClass('fa-trash-o'); }}); }else{ var targetID=$this.data('targetid'), userID=$this.data('uid'), delType='', delIDS='', dellAll=''; if($this.hasClass('dis-del')){ delType='dis'; } if($this.hasClass('event-del')){ delType='event'; } if($this.hasClass('ann-del')){ delType='ann'; } if($this.hasClass('offer-del')){ delType='offer'; delIDS=$this.data('del-ids'); } if($this.hasClass('menu-del')){ delType='menu'; delIDS=$this.data('lid'); } if($this.hasClass('del-type')){ delType='type'; dellAll=jQuery('input[name="delete-group-type"]:checked').val(); } if($this.hasClass('del-group')){ delType='group'; dellAll=jQuery('input[name="delete-group-type"]:checked').val(); } jQuery(this).append(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'del_ann_dis_menu_cb', 'user_id':userID, 'delType':delType, 'targetID':targetID, 'delIDS':delIDS, 'dellAll':dellAll, }, success: function(res){ if(res.status=='success'){ location.reload(); } $this.find('i').removeClass('fa-spin fa-spinner').addClass('fa-trash-o'); }, error: function(err){ console.log(err); $this.find('i').removeClass('fa-spin fa-spinner').addClass('fa-trash-o'); }}); }}); jQuery(document).on('click', 'a.event-edit, a.menu-edit, a.ann-edit, a.dis-edit, a.offer-edit', function(e){ e.preventDefault(); var $this=jQuery(this), targetID=$this.data('targetid'), updateWrap='#update-wrap-'+targetID; if(jQuery('.active-update-form').length!=0){ jQuery('.active-update-form').slideUp(500, function (e){ jQuery('.active-update-form').removeClass('active-ann-form'); jQuery(updateWrap).slideToggle('500', function (e){ jQuery(updateWrap).addClass('active-update-form'); jQuery('.cancel-update').click(function(e){ e.preventDefault(); jQuery('.active-update-form').slideUp(500, function (e){ jQuery('.active-update-form').removeClass('active-update-form'); }) }) }); }); }else{ jQuery(updateWrap).slideToggle('500', function (e){ jQuery(updateWrap).addClass('active-update-form'); jQuery('.cancel-update').click(function(e){ e.preventDefault(); jQuery('.active-update-form').slideUp(500, function (e){ jQuery('.active-update-form').removeClass('active-update-form'); }) }) }); }}); jQuery(document).on('click', '.edit-menu-item', function (e){ e.preventDefault(); var $this=jQuery(this), targetID=$this.data('menuid'), updateWrap='#menu-update-'+targetID; if(jQuery('.active-update-formm').length!=0){ jQuery('.active-update-formm').slideUp(500, function (e){ jQuery('.active-update-formm').removeClass('active-ann-form'); jQuery(updateWrap).slideToggle('500', function (e){ jQuery(updateWrap).addClass('active-update-formm'); jQuery('.cancel-update-menu').click(function(e){ e.preventDefault(); jQuery('.active-update-formm').slideUp(500, function (e){ jQuery('.active-update-formm').removeClass('active-update-formm'); }) }) }); }); }else{ jQuery(updateWrap).slideToggle('500', function (e){ jQuery(updateWrap).addClass('active-update-formm'); jQuery('.cancel-update-menu').click(function(e){ e.preventDefault(); jQuery('.active-update-formm').slideUp(500, function (e){ jQuery('.active-update-formm').removeClass('active-update-formm'); }) }) }); }}); if(jQuery('.lp-countdown').length!=0){ jQuery('.lp-countdown').each(function (i, obj){ var selector='#'+jQuery(this).attr('id'); init_countdown(selector); }); }}); jQuery(document).on('change', '#discount_displayin', function (e){ e.preventDefault(); var $this=jQuery(this), thisval=$this.val(), userID=$this.data('udi'); jQuery($this).after(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'discount_display_area', 'userID':userID, 'thisval':thisval, }, success: function(res){ jQuery('#discount_displayin').next('i').remove(); }, error: function(err){ alert(err); $this.find('i').remove(); }}); }) jQuery(document).on('click', '.lp-edit-offer', function(e){ e.preventDefault(); var $this=jQuery(this), userID=$this.data('uid'), offerID=$this.data('offerid'), offerTitle=jQuery('#offer-title-'+offerID).val(), offerDes=jQuery('#offer-description-'+offerID).val(), offerExp=jQuery('#offer-expriry-'+offerID).val(), offerBT=jQuery('#offer-btn-text-'+offerID).val(), offerBL=jQuery('#offer-btn-link-'+offerID).val(), offerLI=jQuery('#offer-listing-'+offerID).val(); if(!jQuery('.btn-link-field-toggle').hasClass('link-active')){ offerBL=''; } $this.append(''); if(offerLI==null||offerLI==''||offerTitle==''||offerExp==''){ jQuery('.ann-err-msg').fadeIn(500).delay(1500).fadeOut(500); $this.find('i').remove(); return false; } jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_offer_cb', 'user_id':userID, 'offerTitle':offerTitle, 'offerDes':offerDes, 'offerExp':offerExp, 'offerBT':offerBT, 'offerBL':offerBL, 'offerLI':offerLI, 'offerUP':'yes', 'offerID':offerID }, success: function(res){ $this.find('i').removeClass('fa-spin fa-spinner'); $this.find('i').addClass('fa fa-check'); location.reload(); }, error: function(err){ alert(err); $this.find('i').remove(); }}); }); jQuery(document).on('click', '.lp-edit-dis', function (e){ e.preventDefault(); var $this=jQuery(this), disID=$this.data('disid'), userID=$this.data('uid'), disHea=jQuery('#dis-heading-'+disID).val(), disCod=jQuery('#dis-code-'+disID).val(), disExpE=jQuery('#dis-expiry-e-'+disID).val(), disExpS=jQuery('#dis-expiry-s-'+disID).val(), disBT=jQuery('#dis-btn-text-'+disID).val(), disBL=jQuery('#dis-btn-link-'+disID).val(), disLI=$this.data('listid'), disOff=jQuery('#dis-off-'+disID).val(), disImg=jQuery('.edit-upload-'+disID+' .frontend-input').val(); disDes=jQuery('#dis-description-'+disID).val(); $this.append(''); if(disLI==0||disLI==''){ jQuery('.ann-err-msg').fadeIn(500).delay(1500).fadeOut(500); $this.find('i').remove(); return false; } if(disImg==''){ disImg=jQuery('#dis-old-img-'+disID).val(); } jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_discount_cb', 'user_id':userID, 'disID':disID, 'disHea':disHea, 'disCod':disCod, 'disExpE':disExpE, 'disExpS':disExpS, 'disBT':disBT, 'disBL':disBL, 'disLI':disLI, 'disDes':disDes, 'disOff':disOff, 'disImg':disImg, 'disUp':'yes' }, success: function(res){ ajax_success_popup(res, $this); }, error: function(err){ }}); }); jQuery(document).on('click', '.lp-edit-announcements', function (e){ e.preventDefault(); var $this=jQuery(this), annID=$this.data('annid'), userID=$this.data('uid'), annMsg=jQuery('#announcements-message-'+annID).val(), annBT=jQuery('#announcements-btn-text-'+annID).val(), annBL=jQuery('#announcements-btn-link-'+annID).val(), annSt=jQuery('#ann-style-val-'+annID).val(), annTI=jQuery('#announcements-title-'+annID).val(), annIC=jQuery('#announcements-icon-'+annID).val(), annLI=jQuery(this).data('lid'); $this.append(''); if(annLI==0||annLI==''||annMsg==''){ jQuery('.ann-err-msg-'+annID).fadeIn(500).delay(1500).fadeOut(500); $this.find('i').remove(); return false; } jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_announcements_cb', 'user_id':userID, 'annMsg':annMsg, 'annSt':annSt, 'annBT':annBT, 'annBL':annBL, 'annLI':annLI, 'annTI':annTI, 'annIC':annIC, 'annUP':'yes', 'annID':annID, }, success: function(res){ ajax_success_popup(res, $this); }, error: function(err){ }}); }); jQuery(document).on('click', '.lp-edit-menu', function (e){ e.preventDefault(); var $this=jQuery(this), userID=$this.data('uid'), LID=$this.data('lid'), menuID=$this.data('menuid'), mTitle=jQuery('#menu-title-'+menuID).val(), mDetail=jQuery('#menu-detail-'+menuID).val(), mOldPrice=jQuery('#menu-old-price-'+menuID).val(), mNewPrice=jQuery('#menu-new-price-'+menuID).val(), mQuoteT=jQuery('#menu-quote-text-'+menuID).val(), mQuoteL=jQuery('#menu-quote-link-'+menuID).val(), mLink=jQuery('#menu-link-'+menuID).val(), mGroup=jQuery('#menu-group-'+menuID).val(), mType=jQuery('#menu-type-'+menuID).val(), mImage=jQuery('.edit-upload-'+menuID+' .frontend-input').val(); if(mImage==''){ mImage=jQuery('#dis-old-img-'+menuID).val(); } $this.append(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data: { 'action': 'add_menu_cb', 'user_id': userID, 'LID':LID, 'menuID':menuID, 'mTitle': mTitle, 'mDetail': mDetail, 'mOldPrice': mOldPrice, 'mNewPrice': mNewPrice, 'mQuoteT': mQuoteT, 'mQuoteL': mQuoteL, 'mLink': mLink, 'mImage': mImage, 'mType':mType, 'mGroup':mGroup, 'menuUp': 'yes' }, success: function (res){ ajax_success_popup(res, $this); }, error: function (err){ alert(err); $this.find('i').remove(); }}); }); function init_countdown(selector){ var $this=jQuery(selector); if(!$this.length) return false; var clock; var daysLabel=jQuery(selector).data('label-days'), hoursLabel=jQuery(selector).data('label-hours'), minsLabel=jQuery(selector).data('label-mints'), cDay=jQuery(selector).data('day'), cMonth=jQuery(selector).data('month'), cYear=jQuery(selector).data('year'); FlipClock.Lang.Custom={ days: daysLabel, hours: hoursLabel, minutes: minsLabel }; var startDate=new Date(cYear, cMonth, cDay); var now=Math.floor(Date.now()/1000); var clockStart=startDate.getTime()/1000 - now; var numDays=Math.floor(clockStart / 86400); var minDigits=6; if(numDays > 99){ minDigits=7; } clock=jQuery(selector).FlipClock({ clockFace: 'DailyCounter', autoStart: true, showSeconds: false, language: 'Custom', minimumDigits: minDigits }); clock.setTime(clockStart); clock.setCountdown(true); } jQuery(document).on('mouseleave', '#menu-categories-menu', function (e){ jQuery('.lp-header-nav-btn').removeClass('active-can-menu'); jQuery('#menu-categories-menu').css('opacity', '0'); jQuery('#menu-categories-menu').css('transform', 'scale(0)'); }); jQuery(document).on('click', '.lp-ann-btn', function (e){ e.preventDefault(); var targetANN='#'+jQuery(this).attr('data-ann'); jQuery(targetANN).find('.lp-listing-announcement').fadeIn(); jQuery(targetANN).find('.lp-listing-announcement').addClass('active-ann'); jQuery('.code-overlay').fadeIn(); }); jQuery(document).on('click', '.close-ann', function (e){ e.preventDefault(); jQuery('.active-ann').fadeOut(); jQuery('.active-ann').removeClass('active-ann'); jQuery('.code-overlay').fadeOut(); }); jQuery(document).on('click', '.lp-coupon-btn', function(e){ e.preventDefault(); var targetCOUP='#'+jQuery(this).data('coupon'); jQuery(targetCOUP).fadeIn(); jQuery(targetCOUP).addClass('active-coupon'); jQuery('.code-overlay').fadeIn(); }); jQuery(document).on('click', '.close-coupon', function (e){ e.preventDefault(); jQuery('.active-coupon').fadeOut(); jQuery('.active-coupon').removeClass('active-coupon'); jQuery('.code-overlay').fadeOut(); }); jQuery(document).on('shown.bs.tab', 'a[href="#menu_tab"]', function (e){ jQuery('.lp-listing-menuu-slider').slick('refresh'); }); jQuery(document).on('click', '.ann-toggle-btn', function (e){ e.preventDefault(); var $this=jQuery(this), status=$this.attr('data-status'), annID=$this.data('annid'), userID=$this.data('uid'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_announcements_cb', 'user_id':userID, 'status':status, 'annID':annID, 'annUP':'on-off' }, success: function(res){ if(res.status==0){ status='inactive'; } else if(res.status==1){ status='active'; } $this.attr('data-status', status); }, error: function(err){ $this.find('i').remove(); }}); }); jQuery(document).on('change', '.on-off-ann', function (e){ e.preventDefault(); var $this=jQuery(this), status=$this.attr('data-status'), annID=$this.data('annid'), userID=$this.data('uid'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_announcements_cb', 'user_id':userID, 'status':status, 'annID':annID, 'annUP':'on-off' }, success: function(res){ if(res.status==0){ status='inactive'; } else if(res.status==1){ status='active'; } $this.attr('data-status', status); }, error: function(err){ $this.find('i').remove(); }}); }); jQuery(document).on('keyup', '#announcements-message', function (e){ var thisText=jQuery(this).val(); jQuery('.ann-preivew-wrap .announcement-wrap span').text(thisText); jQuery('.field-desc strong').text(thisText.length); }); jQuery(document).on('keyup', '#announcements-title', function (e){ var thisText=jQuery(this).val(); jQuery('.ann-preivew-wrap .announcement-wrap strong').text(thisText); }); jQuery(document).on('keyup', '#announcements-btn-text', function (e){ var thisText=jQuery(this).val(); jQuery('.ann-preivew-wrap .announcement-wrap .announcement-btn').text(thisText); }); jQuery(document).on('focusout', '#announcements-icon', function (e){ var thisText=jQuery(this).val(); if(thisText==''){ return false; } if(thisText.match("^fa")){ jQuery('.announcement-wrap img').hide(); jQuery('.announcement-wrap i').show(); jQuery(this).attr('icon-type', 'fa-icon'); jQuery('.announcement-wrap i').removeClass().addClass('fa '+thisText); }else{ jQuery('.announcement-wrap i').hide() jQuery('.announcement-wrap img').show(); jQuery('.announcement-wrap img').attr('src', thisText); jQuery(this).attr('icon-type', 'img-icon'); }}); function slickINIT(){ if(jQuery('.lp-listing-menuu-slider').length!=0){ jQuery('.lp-listing-menuu-slider').slick({ infinite: true, slidesToShow: 1, slidesToScroll: 1, adaptiveHeight: true, nextArrow: "", prevArrow: "" }); }} jQuery(document).on('change', '.coupons-fields-switch input[type="checkbox"]', function (e){ e.preventDefault(); var targetID=jQuery(this).data('target'); if(targetID=='coupon-external'){ if(jQuery(this).is(':checked')){ jQuery('#code-switch').slideUp(500, function (){ jQuery('#btn-url-switch').slideDown(500); }); }else{ jQuery('#btn-url-switch').slideUp(500, function (){ jQuery('#code-switch').slideDown(500); }); }}else if(targetID=='quote-button'){ if(jQuery(this).is(':checked')){ jQuery('.menu-price-wrap').slideUp(500, function (){ jQuery('.menu-quote-wrap').slideDown(500); }); }else{ jQuery('.menu-quote-wrap').slideUp(500, function (){ jQuery('.menu-price-wrap').slideDown(500); }); }}else{ jQuery('#'+targetID+'-switch').slideToggle(500, function (){ if(!jQuery('#date-switch').is(':visible')&&!jQuery('#time-switch').is(':visible')){ jQuery('.empty-row-check').slideToggle(); }}); }}); jQuery(document).on('click', '.add-new-type', function(e){ e.preventDefault(); jQuery('#menu-type-new, .save-new-type').fadeIn(); }); jQuery(document).on('click', '.add-new-group', function(e){ e.preventDefault(); jQuery('#menu-group-new, .save-new-group').fadeIn(); }); jQuery(document).on('click', '.save-new-type', function (e){ e.preventDefault(); var $this=jQuery(this), userID=$this.data('uid'), type=jQuery('#menu-type-new').val(); $this.append(''); if(type==''){ jQuery('#menu-type-new').addClass('error'); $this.find('i').remove(); return false; }else{ jQuery('#menu-type-new').removeClass('error'); } if($this.hasClass('processing')){ }else{ $this.addClass('processing'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_menu_type_cb', 'user_id':userID, 'type':type, }, success: function(res){ if($this.hasClass('manage-type-group-form')){ location.reload(); }else{ var optData={ id: type, text: type }; var newOption=new Option(optData.text, optData.id, false, false); jQuery('#menu-type').append(newOption).trigger('change'); var currentTypes=jQuery('#menu-type').val(); if(currentTypes==null){ jQuery('#menu-type').val(type).trigger('change'); }else{ currentTypes.push(type); jQuery('#menu-type').val(currentTypes).trigger('change'); }} $this.find('i').removeClass('fa-spin fa-spinner'); $this.find('i').remove(); $this.removeClass('processing'); jQuery('#menu-type-new').val(''); }, error: function(err){ alert(err); $this.find('i').remove(); }}); }}); jQuery(document).on('click', '.save-new-group', function (e){ e.preventDefault(); var $this=jQuery(this), userID=$this.data('uid'), group=jQuery('#menu-group-new').val(); $this.append(''); if(group==''){ jQuery('#menu-group-new').addClass('error'); $this.find('i').remove(); return false; }else{ jQuery('#menu-group-new').removeClass('error'); } if($this.hasClass('processing')){ }else{ $this.addClass('processing'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_menu_group_cb', 'user_id':userID, 'group':group, }, success: function(res){ if($this.hasClass('manage-type-group-form')){ location.reload(); }else{ var optData={ id: group, text: group }; var newOption=new Option(optData.text, optData.id, false, false); jQuery('#menu-group').append(newOption).trigger('change'); var currentGroups=jQuery('#menu-group').val(); if(currentGroups==null){ jQuery('#menu-group').val(group).trigger('change'); }else{ currentGroups.push(group); jQuery('#menu-group').val(currentGroups).trigger('change'); }} $this.find('i').removeClass('fa-spin fa-spinner'); $this.find('i').remove(); $this.removeClass('processing'); jQuery('#menu-group-new').val(''); }, error: function(err){ alert(err); $this.find('i').remove(); }}); }}); jQuery(document).on('click', '.del-all-menu', function (e){ e.preventDefault(); jQuery(this).addClass('remove-active'); jQuery('#dashboard-delete-modal').modal('show'); jQuery('.modal-backdrop').hide(); }); jQuery(document).on('click', '#lp-save-events', function(e){ e.preventDefault(); var $this=jQuery(this), eTitle=jQuery('#event-title').val(), eDesc=jQuery('#event-description').val(), eDate=jQuery('#event-date-s').val(), eTime=jQuery('#event-time').val(), eLoc=jQuery('#event-location').val(), eLat=jQuery('#lp-events-form .latitude').val(), eLon=jQuery('#lp-events-form .longitude').val(), eTUrl=jQuery('#event-ticket-url').val(), eLID=jQuery('#event-listing').val(), eImg=jQuery('.new-file-upload .frontend-input').val(), eUID=$this.data('uid'), eUtils=''; jQuery('.coupons-fields-switch').find('.switch-checkbox').each(function (){ var CheckboxX=jQuery(this), target=CheckboxX.data('target'), targetVal='' if(CheckboxX.is(':checked')){ targetVal='yes'; }else{ targetVal='no'; } eUtils +=target+'|'+targetVal+'*'; }); if(eLID==''||eLID==0||eLID==null){ jQuery('#select2-event-listing-container').addClass('error'); }else{ jQuery('#select2-event-listing-container').removeClass('error'); } if(eTitle==''){ jQuery('#event-title').addClass('error'); }else{ jQuery('#event-title').removeClass('error'); } if(eLoc==''){ jQuery('#event-location').addClass('error'); }else{ jQuery('#event-location').removeClass('error'); } if(eDate==''){ jQuery('#event-date-s').addClass('error'); }else{ jQuery('#event-date-s').removeClass('error'); } if(eTime==''){ jQuery('#event-time').addClass('error'); }else{ jQuery('#event-time').removeClass('error'); } if(eLID==''||eLID==0||eLID==null||eTitle==''||eTime==''||eDate==''||eLoc==''){ var dataError=[]; dataError.status='error'; dataError.msg=jQuery('.lp-notifaction-area').data('error-msg'); ajax_success_popup(dataError, $this); return false; } $this.append(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_events_cb', 'eTitle':eTitle, 'eDesc':eDesc, 'eDate':eDate, 'eTime':eTime, 'eLoc':eLoc, 'eLat':eLat, 'eLon':eLon, 'eTUrl':eTUrl, 'eLID':eLID, 'eUID':eUID, 'eImg':eImg, 'eUtils':eUtils, }, success: function(res){ ajax_success_popup(res, $this); }, error: function(err){ console.log(err); }}); }); jQuery(document).on('click', '.lp-save-events', function(e){ e.preventDefault(); var $this=jQuery(this), eID=$this.data('eid'), eTitle=jQuery('#event-title-'+eID).val(), eDesc=jQuery('#event-description-'+eID).val(), eDate=jQuery('#event-date-s-'+eID).val(), eTime=jQuery('#event-time-'+eID).val(), eLoc=jQuery('#event-location-'+eID).val(), eLat=$this.closest('.lp-coupons-form-inner').find('.latitude').val(), eLong=$this.closest('.lp-coupons-form-inner').find('.longitude').val(), eTUrl=jQuery('#event-ticket-url-'+eID).val(), eImg=jQuery('.edit-upload-'+eID+' .frontend-input').val(), eUID=$this.data('uid'); if(eTitle==''){ jQuery('#event-title').addClass('error'); }else{ jQuery('#event-title').removeClass('error'); } if(eTitle==''){ return false; } if(eImg==''){ eImg=jQuery('#event-old-img-'+eID).val(); } $this.append(''); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data:{ 'action': 'add_events_cb', 'eTitle':eTitle, 'eDesc':eDesc, 'eDate':eDate, 'eTime':eTime, 'eLoc':eLoc, 'eLat':eLat, 'eLon':eLong, 'eTUrl':eTUrl, 'eUID':eUID, 'eID':eID, 'eImg':eImg, 'eUp':'yes' }, success: function(res){ ajax_success_popup(res, $this); }, error: function(err){ console.log(err); }}); }); jQuery(document).on('click', '.attend-event', function (e){ e.preventDefault(); var $this=jQuery(this), eID=$this.data('event'), eUID=$this.data('uid'); if($this.hasClass('processing')){ }else{ $this.append(''); $this.addClass('processing'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_search_term_object.ajaxurl, data: { 'action': 'event_attending_cb', 'eID': eID, 'eUID': eUID, }, success: function (res){ $this.closest('.lp-events-btns-outer').find('.total-going').text(res.total_attending); $this.find('i').removeClass('fa-spin fa-spinner').addClass('fa-check'); }, error: function (err){ console.log(err); }}); }}); jQuery(document).on('click', '.cancel-ad-new-btn', function (e){ e.preventDefault(); var targetForm='#'+jQuery(this).data('cancel')+'-form-toggle'; jQuery(targetForm).fadeOut('slow', function (){ jQuery('html, body').animate({ scrollTop: jQuery('.add-new-open-form').offset().top }, 1000); }); }); jQuery(document).on('click', '.lp-notifi-icons', function (e){ e.preventDefault(); jQuery(this).closest('.active-wrap').removeClass('active-wrap'); }); jQuery(document).ready(function (){ jQuery('#fill-o-bot-check').on('change', function(e){ if(jQuery(this).is(':checked')){ jQuery('#lptitle').attr('type', 'hidden'); jQuery('.lptitle').addClass('fill-o-bot-active'); jQuery('#lptitle').attr('name', ''); jQuery('#lptitleGoogle').attr('name', 'postTitle'); jQuery('#lptitleGoogle').attr('type', 'text'); }else{ jQuery('#lptitleGoogle').attr('type','hidden'); jQuery('.lptitle').removeClass('fill-o-bot-active'); jQuery('#lptitle').attr('name', 'postTitle'); jQuery('#lptitle').attr('type', 'text'); jQuery('#lptitleGoogle').attr('name', ''); }}); }); jQuery('html').click(function (e){ if(jQuery('.lp-multi-star-wrap').is(":visible")&&e.target.className!='open-multi-rate-box'){ jQuery('.lp-multi-star-wrap').slideUp(); }}); function ajax_success_popup(res, $this){ if(res.status=='success'){ $this.find('i').removeClass('fa-spin fa-spinner').addClass('fa-check'); jQuery('.lp-notifaction-area').find('h4').text(res.msg); jQuery('.lp-notifaction-area').removeClass('lp-notifaction-error').addClass('lp-notifaction-success'); jQuery('.lp-notifaction-area').addClass('active-wrap'); location.reload(); } if(res.status=='error'){ $this.find('i').remove(); jQuery('.lp-notifaction-area').find('h4').text(res.msg); jQuery('.lp-notifaction-area').removeClass('lp-notifaction-success').addClass('lp-notifaction-error'); jQuery('.lp-notifaction-area').addClass('active-wrap'); }} jQuery(document).on('keyup', '#menu-type-new, #menu-group-new', function(){ var typeGroupText=jQuery(this).val(), errMsg=jQuery(this).data('err'), re=/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi; var isSplChar=re.test(typeGroupText); if(isSplChar){ var no_spl_char=typeGroupText.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, ''); jQuery(this).val(no_spl_char); jQuery(this).after('

    '+ errMsg +'

    '); }}); jQuery(document).ready(function(){ jQuery('.lp-event-view-less').click(function(e){ e.preventDefault(); var lessText=jQuery(this).data('contract'); var moreText=jQuery(this).data('expand'); if(jQuery(this).hasClass('event-shown')){ jQuery(this).removeClass('event-shown'); jQuery(this).html(moreText); jQuery('.lp-attende-extra').removeClass('active'); }else{ jQuery(this).addClass('event-shown'); jQuery('.lp-attende-extra').addClass('active'); jQuery(this).html(lessText); }}); function initializeEventAddr(){ if(jQuery('.event-addr').length > 0){ jQuery('.event-addr').each(function(index){ var input=document.getElementById(jQuery(this).attr('id')); var autocomplete=new google.maps.places.Autocomplete(input); google.maps.event.addListener(autocomplete, 'place_changed', function (){ var place=autocomplete.getPlace(); var lat=place.geometry.location.lat(); var lon=place.geometry.location.lng(); jQuery('input.latitude').val(lat); jQuery('input.longitude').val(lon); }); }); }} google.maps.event.addDomListener(window, 'load', initializeEventAddr); }); jQuery(document).on('click', 'span.remove-menu-img', function (e){ e.preventDefault(); var targetID=jQuery(this).data('target'), targetSrc=jQuery(this).data('src')+',', targetImgs=jQuery('.active-upload').find('.frontend-input-multiple').val(); if(targetImgs==undefined){ targetImgs=jQuery('#'+targetID).val(); } targetImgs=targetImgs.replace(targetSrc, ''); jQuery(this).closest('.menu-edit-img-wrap').remove(); jQuery('input#'+targetID).val(targetImgs); }); jQuery(document).on('click', '.select2-results ul li', function(e){ jQuery('.lp-pp-noa-tip').fadeIn(); }); jQuery('.select2-ajax-unique').on('select2:select', function (e){ jQuery('.lp-pp-noa-tip').fadeOut(); }); jQuery('.select2-ajax').on('select2:select', function (e){ jQuery('.lp-pp-noa-tip').fadeOut(); }); jQuery(document).on('click', '.remove-event-img', function (e){ e.preventDefault(); var $this=jQuery(this); if($this.hasClass('remove-eei')){ var targetID=$this.data('targetid'); $this.closest('.removeable-image').find('.frontend-image').attr('src', ''); $this.closest('.removeable-image').find('.lp-uploaded-img').attr('src', ''); $this.closest('.removeable-image').find('.frontend-input').val(''); jQuery('#event-old-img-'+targetID).val(''); $this.remove(); }else{ $this.closest('.removeable-image').find('.frontend-image').attr('src', ''); $this.closest('.removeable-image').find('.frontend-input').val(''); $this.remove(); }}); jQuery(document).ready(function(){ jQuery('#reservaListing').select2({ ajax: { url: ajax_search_term_object.ajaxurl, dataType: 'json', type:'GET', data: function (params){ return { q: params.term, action: 'select2_ajax_dashbaord_listing_booking' }; console.log(params); }, processResults: function(data){ var options=[]; if(data){ jQuery.each(data, function(index, text){ options.push({ id: text[0], text: text[1] }); }); } return { results: options };}, cache: true }, minimumInputLength: 3 }); }); jQuery(document).on('click', '.lp-copy-code', function (e){ e.preventDefault(); var $this=jQuery(this); var targetCodeEL=jQuery(this).data('target-code'), thisHtml=jQuery(this).data('html'), targetCodeELC='.'+targetCodeEL; if($this.hasClass('close-copy-pop')){ jQuery(targetCodeELC).animate({ bottom: '-'+ jQuery(targetCodeELC).height() +'px' }, 500, function (e){ $this.html(thisHtml); $this.removeClass('close-copy-pop'); }); }else{ var bottomPlus=0; if($this.hasClass('lp-discount-btn')){ bottomPlus=49; } jQuery(targetCodeELC).animate({ bottom: bottomPlus+'px' }, 500, function (e){ if($this.hasClass('lp-discount-btn')){ $this.addClass('close-copy-pop'); $this.html(''); }}); }}); jQuery(document).on('click', '.close-right-icon', function (e){ e.preventDefault(); var $this=jQuery(this), target='.'+$this.data('target'); jQuery(target).animate({ bottom: '-'+jQuery(target).height()+'px' }); }); jQuery(document).on('click', '.copy-now', function (e){ e.preventDefault(); var targetCodeEL=jQuery(this).data('target-code'), targetCodeELC='#'+targetCodeEL; jQuery(targetCodeELC).find('input[type="text"]').select(); document.execCommand ("copy"); jQuery(targetCodeELC).find('.dis-code-copy-pop-inner-cell').find('p:first-child').text(jQuery('.copy-now').data('coppied-label')); }); jQuery(document).on('click', '.lp-pagination.author-reviews-pagination span', function (e){ e.preventDefault(); var paginNo=jQuery(this).data('pageurl'); jQuery('.reviews-pagin-wrap').hide(); jQuery('.reviews-pagin-wrap.reviews-pagin-wrap-'+paginNo).show(); }); jQuery(document).on('click', '.lp-filter-pagination-ajx ul li span.author-haspaglink', function (e){ e.preventDefault(); var pageNo=jQuery(this).data('pageurl'), authorID=jQuery('.lp-author-nav').data('author'), authorPagin='yes', listingLayout=jQuery('#mylistings').data('listing-layout'); jQuery('.lp-filter-pagination-ajx ul li span').removeClass('current'); jQuery(this).addClass('current'); jQuery('#mylistings').find('.author-inner-content-wrap').addClass('content-loading'); jQuery('#mylistings #content-grids').remove(); jQuery.ajax({ type: 'POST', url: ajax_search_term_object.ajaxurl, data: { 'action': 'author_archive_tabs_cb', 'pageNo': pageNo, 'authorID':authorID, 'authorPagin':authorPagin, 'listingLayout':listingLayout }, success: function(data){ jQuery('#mylistings').find('.author-inner-content-wrap').removeClass('content-loading'); jQuery('#mylistings').find('.author-inner-content-wrap').html(data); console.log(data); }}); }); jQuery(document).ready(function(){ if(jQuery('.featuresDataContainer.lp-check-custom-wrapp').length > 0){ jQuery('.featuresDataContainerOuterSubmit').show(); jQuery('.featuresDataContainer.lp-check-custom-wrapp').show(); }}); !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=14)}([function(t,e){t.exports=jQuery},,,function(t,e){!function(t){"use strict";t.fn.fitVids=function(e){var n={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("div");i.innerHTML='

    x

    ',r.appendChild(i.childNodes[1])}return e&&t.extend(n,e),this.each((function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];n.customSelector&&e.push(n.customSelector);var r=".fitvidsignore";n.ignore&&(r=r+", "+n.ignore);var i=t(this).find(e.join(","));(i=(i=i.not("object object")).not(r)).each((function(){var e=t(this);if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var n=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("name")){var i="fitvid"+t.fn.fitVids._count;e.attr("name",i),t.fn.fitVids._count++}e.wrap('
    ').parent(".fluid-width-video-wrapper").css("padding-top",100*n+"%"),e.removeAttr("height").removeAttr("width")}}))}))},t.fn.fitVids._count=0}(window.jQuery||window.Zepto)},function(t,e){ !function(){"use strict";function t(r){if(!r)throw new Error("No options passed to Waypoint constructor");if(!r.element)throw new Error("No element option passed to Waypoint constructor");if(!r.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,r),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=r.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),n[this.key]=this,e+=1}var e=0,n={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete n[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var r in n)e.push(n[r]);for(var i=0,o=e.length;o>i;i++)e[i][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=i.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+n,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,r[t.waypointContextKey]=this,n+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var n=0,r={},i=window.Waypoint,o=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete r[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",(function(){e.didResize||(e.didResize=!0,i.requestAnimationFrame(t))}))},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",(function(){(!e.didScroll||i.isTouch)&&(e.didScroll=!0,i.requestAnimationFrame(t))}))},e.prototype.handleResize=function(){i.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var n in e){var r=e[n],i=r.newScroll>r.oldScroll?r.forward:r.backward;for(var o in this.waypoints[n]){var a=this.waypoints[n][o],s=r.oldScroll=a.triggerPoint;(s&&c||!s&&!c)&&(a.queueTrigger(i),t[a.group.id]=a.group)}}for(var u in t)t[u].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?i.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?i.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var n in this.waypoints[e])t.push(this.waypoints[e][n]);for(var r=0,i=t.length;i>r;r++)t[r].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,n=e?void 0:this.adapter.offset(),r={};for(var o in this.handleScroll(),t={horizontal:{contextOffset:e?0:n.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:n.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var a=t[o];for(var s in this.waypoints[o]){var c,u,l,f,d=this.waypoints[o][s],p=d.options.offset,_=d.triggerPoint,h=0,v=null==_;d.element!==d.element.window&&(h=d.adapter.offset()[a.offsetProp]),"function"==typeof p?p=p.apply(d):"string"==typeof p&&(p=parseFloat(p),d.options.offset.indexOf("%")>-1&&(p=Math.ceil(a.contextDimension*p/100))),c=a.contextScroll-a.contextOffset,d.triggerPoint=h+c-p,u=_=a.oldScroll,f=!u&&!l,!v&&(u&&l)?(d.queueTrigger(a.backward),r[d.group.id]=d.group):!v&&f?(d.queueTrigger(a.forward),r[d.group.id]=d.group):v&&a.oldScroll>=d.triggerPoint&&(d.queueTrigger(a.forward),r[d.group.id]=d.group)}}return i.requestAnimationFrame((function(){for(var t in r)r[t].flushTriggers()})),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in r)r[t].refresh()},e.findByElement=function(t){return r[t.waypointContextKey]},window.onload=function(){o&&o(),e.refreshAll()},i.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},i.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function n(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),r[this.axis][this.name]=this}var r={vertical:{},horizontal:{}},i=window.Waypoint;n.prototype.add=function(t){this.waypoints.push(t)},n.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},n.prototype.flushTriggers=function(){for(var n in this.triggerQueues){var r=this.triggerQueues[n],i="up"===n||"left"===n;r.sort(i?e:t);for(var o=0,a=r.length;a>o;o+=1){var s=r[o];(s.options.continuous||o===r.length-1)&&s.trigger([n])}}this.clearTriggerQueues()},n.prototype.next=function(e){this.waypoints.sort(t);var n=i.Adapter.inArray(e,this.waypoints);return n===this.waypoints.length-1?null:this.waypoints[n+1]},n.prototype.previous=function(e){this.waypoints.sort(t);var n=i.Adapter.inArray(e,this.waypoints);return n?this.waypoints[n-1]:null},n.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},n.prototype.remove=function(t){var e=i.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},n.prototype.first=function(){return this.waypoints[0]},n.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},n.findOrCreate=function(t){return r[t.axis][t.name]||new n(t)},i.Group=n}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,n=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],(function(e,n){t.prototype[n]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[n].apply(this.$element,t)}})),e.each(["extend","inArray","isEmptyObject"],(function(n,r){t[r]=e[r]})),n.adapters.push({name:"jquery",Adapter:t}),n.Adapter=t}(),function(){"use strict";function t(t){return function(){var n=[],r=arguments[0];return t.isFunction(arguments[0])&&((r=t.extend({},arguments[1])).handler=arguments[0]),this.each((function(){var i=t.extend({},r,{element:this});"string"==typeof i.context&&(i.context=t(this).closest(i.context)[0]),n.push(new e(i))})),n}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}()},function(t,e,n){var r,i,o; i=[n(0)],void 0===(o="function"==typeof(r=function(t){var e,n,r,i,o,a,s="Close",c="BeforeClose",u="MarkupParse",l="Open",f="Change",d="mfp",p="."+d,_="mfp-ready",h="mfp-removing",v="mfp-prevent-close",g=function(){},m=!!window.jQuery,b=t(window),y=function(t,n){e.ev.on(d+t+p,n)},w=function(e,n,r,i){var o=document.createElement("div");return o.className="mfp-"+e,r&&(o.innerHTML=r),i?n&&n.appendChild(o):(o=t(o),n&&o.appendTo(n)),o},x=function(n,r){e.ev.triggerHandler(d+n,r),e.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),e.st.callbacks[n]&&e.st.callbacks[n].apply(e,t.isArray(r)?r:[r]))},C=function(n){return n===a&&e.currTemplate.closeBtn||(e.currTemplate.closeBtn=t(e.st.closeMarkup.replace("%title%",e.st.tClose)),a=n),e.currTemplate.closeBtn},k=function(){t.magnificPopup.instance||((e=new g).init(),t.magnificPopup.instance=e)};g.prototype={constructor:g,init:function(){var n=navigator.appVersion;e.isIE7=-1!==n.indexOf("MSIE 7."),e.isIE8=-1!==n.indexOf("MSIE 8."),e.isLowIE=e.isIE7||e.isIE8,e.isAndroid=/android/gi.test(n),e.isIOS=/iphone|ipad|ipod/gi.test(n),e.supportsTransition=function(){var t=document.createElement("p").style,e=["ms","O","Moz","Webkit"];if(void 0!==t.transition)return!0;for(;e.length;)if(e.pop()+"Transition"in t)return!0;return!1}(),e.probablyMobile=e.isAndroid||e.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),r=t(document),e.popupsCache={}},open:function(n){var i;if(!1===n.isObj){e.items=n.items.toArray(),e.index=0;var a,s=n.items;for(i=0;i(t||b.height())},_setFocus:function(){(e.st.focus?e.content.find(e.st.focus).eq(0):e.wrap).focus()},_onFocusIn:function(n){return n.target===e.wrap[0]||t.contains(e.wrap[0],n.target)?void 0:(e._setFocus(),!1)},_parseMarkup:function(e,n,r){var i;r.data&&(n=t.extend(r.data,n)),x(u,[e,n,r]),t.each(n,(function(t,n){if(void 0===n||!1===n)return!0;if((i=t.split("_")).length>1){var r=e.find(p+"-"+i[0]);if(r.length>0){var o=i[1];"replaceWith"===o?r[0]!==n[0]&&r.replaceWith(n):"img"===o?r.is("img")?r.attr("src",n):r.replaceWith(''):r.attr(i[1],n)}}else e.find(p+"-"+t).html(n)}))},_getScrollbarSize:function(){if(void 0===e.scrollbarSize){var t=document.createElement("div");t.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(t),e.scrollbarSize=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return e.scrollbarSize}},t.magnificPopup={instance:null,proto:g.prototype,modules:[],open:function(e,n){return k(),(e=e?t.extend(!0,{},e):{}).isObj=!0,e.index=n||0,this.instance.open(e)},close:function(){return t.magnificPopup.instance&&t.magnificPopup.instance.close()},registerModule:function(e,n){n.options&&(t.magnificPopup.defaults[e]=n.options),t.extend(this.proto,n.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},t.fn.magnificPopup=function(n){k();var r=t(this);if("string"==typeof n)if("open"===n){var i,o=m?r.data("magnificPopup"):r[0].magnificPopup,a=parseInt(arguments[1],10)||0;o.items?i=o.items[a]:(i=r,o.delegate&&(i=i.find(o.delegate)),i=i.eq(a)),e._openClick({mfpEl:i},r,o)}else e.isOpen&&e[n].apply(e,Array.prototype.slice.call(arguments,1));else n=t.extend(!0,{},n),m?r.data("magnificPopup",n):r[0].magnificPopup=n,e.addGroup(r,n);return r};var O,j,S,P="inline",E=function(){S&&(j.after(S.addClass(O)).detach(),S=null)};t.magnificPopup.registerModule(P,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){e.types.push(P),y(s+"."+P,(function(){E()}))},getInline:function(n,r){if(E(),n.src){var i=e.st.inline,o=t(n.src);if(o.length){var a=o[0].parentNode;a&&a.tagName&&(j||(O=i.hiddenClass,j=w(O),O="mfp-"+O),S=o.after(j).detach().removeClass(O)),e.updateStatus("ready")}else e.updateStatus("error",i.tNotFound),o=t("
    ");return n.inlineElement=o,o}return e.updateStatus("ready"),e._parseMarkup(r,{},n),r}}});var T,A="ajax",I=function(){T&&t(document.body).removeClass(T)},M=function(){I(),e.req&&e.req.abort()};t.magnificPopup.registerModule(A,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){e.types.push(A),T=e.st.ajax.cursor,y(s+"."+A,M),y("BeforeChange."+A,M)},getAjax:function(n){T&&t(document.body).addClass(T),e.updateStatus("loading");var r=t.extend({url:n.src,success:function(r,i,o){var a={data:r,xhr:o};x("ParseAjax",a),e.appendContent(t(a.data),A),n.finished=!0,I(),e._setFocus(),setTimeout((function(){e.wrap.addClass(_)}),16),e.updateStatus("ready"),x("AjaxContentAdded")},error:function(){I(),n.finished=n.loadError=!0,e.updateStatus("error",e.st.ajax.tError.replace("%url%",n.src))}},e.st.ajax.settings);return e.req=t.ajax(r),""}}});var L,z,B=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var r=e.st.image.titleSrc;if(r){if(t.isFunction(r))return r.call(e,n);if(n.el)return n.el.attr(r)||""}return""};t.magnificPopup.registerModule("image",{options:{markup:'
    ',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var n=e.st.image,r=".image";e.types.push("image"),y(l+r,(function(){"image"===e.currItem.type&&n.cursor&&t(document.body).addClass(n.cursor)})),y(s+r,(function(){n.cursor&&t(document.body).removeClass(n.cursor),b.off("resize"+p)})),y("Resize"+r,e.resizeImage),e.isLowIE&&y("AfterChange",e.resizeImage)},resizeImage:function(){var t=e.currItem;if(t&&t.img&&e.st.image.verticalFit){var n=0;e.isLowIE&&(n=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",e.wH-n)}},_onImageHasSize:function(t){t.img&&(t.hasSize=!0,L&&clearInterval(L),t.isCheckingImgSize=!1,x("ImageHasSize",t),t.imgHidden&&(e.content&&e.content.removeClass("mfp-loading"),t.imgHidden=!1))},findImageSize:function(t){var n=0,r=t.img[0],i=function(o){L&&clearInterval(L),L=setInterval((function(){return r.naturalWidth>0?void e._onImageHasSize(t):(n>200&&clearInterval(L),void(3==++n?i(10):40===n?i(50):100===n&&i(500)))}),o)};i(1)},getImage:function(n,r){var i=0,o=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===e.currItem&&(e._onImageHasSize(n),e.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,x("ImageLoadComplete")):200>++i?setTimeout(o,100):a())},a=function(){n&&(n.img.off(".mfploader"),n===e.currItem&&(e._onImageHasSize(n),e.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=e.st.image,c=r.find(".mfp-img");if(c.length){var u=document.createElement("img");u.className="mfp-img",n.el&&n.el.find("img").length&&(u.alt=n.el.find("img").attr("alt")),n.img=t(u).on("load.mfploader",o).on("error.mfploader",a),u.src=n.src,c.is("img")&&(n.img=n.img.clone()),(u=n.img[0]).naturalWidth>0?n.hasSize=!0:u.width||(n.hasSize=!1)}return e._parseMarkup(r,{title:B(n),img_replaceWith:n.img},n),e.resizeImage(),n.hasSize?(L&&clearInterval(L),n.loadError?(r.addClass("mfp-loading"),e.updateStatus("error",s.tError.replace("%url%",n.src))):(r.removeClass("mfp-loading"),e.updateStatus("ready")),r):(e.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,r.addClass("mfp-loading"),e.findImageSize(n)),r)}}}),t.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(t){return t.is("img")?t:t.find("img")}},proto:{initZoom:function(){var t,n=e.st.zoom,r=".zoom";if(n.enabled&&e.supportsTransition){var i,o,a=n.duration,u=function(t){var e=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),r="all "+n.duration/1e3+"s "+n.easing,i={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return i["-webkit-"+o]=i["-moz-"+o]=i["-o-"+o]=i[o]=r,e.css(i),e},l=function(){e.content.css("visibility","visible")};y("BuildControls"+r,(function(){if(e._allowZoom()){if(clearTimeout(i),e.content.css("visibility","hidden"),!(t=e._getItemToZoom()))return void l();(o=u(t)).css(e._getOffset()),e.wrap.append(o),i=setTimeout((function(){o.css(e._getOffset(!0)),i=setTimeout((function(){l(),setTimeout((function(){o.remove(),t=o=null,x("ZoomAnimationEnded")}),16)}),a)}),16)}})),y(c+r,(function(){if(e._allowZoom()){if(clearTimeout(i),e.st.removalDelay=a,!t){if(!(t=e._getItemToZoom()))return;o=u(t)}o.css(e._getOffset(!0)),e.wrap.append(o),e.content.css("visibility","hidden"),setTimeout((function(){o.css(e._getOffset())}),16)}})),y(s+r,(function(){e._allowZoom()&&(l(),o&&o.remove(),t=null)}))}},_allowZoom:function(){return"image"===e.currItem.type},_getItemToZoom:function(){return!!e.currItem.hasSize&&e.currItem.img},_getOffset:function(n){var r,i=(r=n?e.currItem.img:e.st.zoom.opener(e.currItem.el||e.currItem)).offset(),o=parseInt(r.css("padding-top"),10),a=parseInt(r.css("padding-bottom"),10);i.top-=t(window).scrollTop()-o;var s={width:r.width(),height:(m?r.innerHeight():r[0].offsetHeight)-a-o};return void 0===z&&(z=void 0!==document.createElement("p").style.MozTransform),z?s["-moz-transform"]=s.transform="translate("+i.left+"px,"+i.top+"px)":(s.left=i.left,s.top=i.top),s}}});var F="iframe",W=function(t){if(e.currTemplate[F]){var n=e.currTemplate[F].find("iframe");n.length&&(t||(n[0].src="//about:blank"),e.isIE8&&n.css("display",t?"block":"none"))}};t.magnificPopup.registerModule(F,{options:{markup:'
    ',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){e.types.push(F),y("BeforeChange",(function(t,e,n){e!==n&&(e===F?W():n===F&&W(!0))})),y(s+"."+F,(function(){W()}))},getIframe:function(n,r){var i=n.src,o=e.st.iframe;t.each(o.patterns,(function(){return i.indexOf(this.index)>-1?(this.id&&(i="string"==typeof this.id?i.substr(i.lastIndexOf(this.id)+this.id.length,i.length):this.id.call(this,i)),i=this.src.replace("%id%",i),!1):void 0}));var a={};return o.srcAction&&(a[o.srcAction]=i),e._parseMarkup(r,a,n),e.updateStatus("ready"),r}}});var H=function(t){var n=e.items.length;return t>n-1?t-n:0>t?n+t:t},R=function(t,e,n){return t.replace(/%curr%/gi,e+1).replace(/%total%/gi,n)};t.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=e.st.gallery,i=".mfp-gallery",a=Boolean(t.fn.mfpFastClick);return e.direction=!0,!(!n||!n.enabled)&&(o+=" mfp-gallery",y(l+i,(function(){n.navigateByImgClick&&e.wrap.on("click"+i,".mfp-img",(function(){return e.items.length>1?(e.next(),!1):void 0})),r.on("keydown"+i,(function(t){37===t.keyCode?e.prev():39===t.keyCode&&e.next()}))})),y("UpdateStatus"+i,(function(t,n){n.text&&(n.text=R(n.text,e.currItem.index,e.items.length))})),y(u+i,(function(t,r,i,o){var a=e.items.length;i.counter=a>1?R(n.tCounter,o.index,a):""})),y("BuildControls"+i,(function(){if(e.items.length>1&&n.arrows&&!e.arrowLeft){var r=n.arrowMarkup,i=e.arrowLeft=t(r.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(v),o=e.arrowRight=t(r.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(v),s=a?"mfpFastClick":"click";i[s]((function(){e.prev()})),o[s]((function(){e.next()})),e.isIE7&&(w("b",i[0],!1,!0),w("a",i[0],!1,!0),w("b",o[0],!1,!0),w("a",o[0],!1,!0)),e.container.append(i.add(o))}})),y(f+i,(function(){e._preloadTimeout&&clearTimeout(e._preloadTimeout),e._preloadTimeout=setTimeout((function(){e.preloadNearbyImages(),e._preloadTimeout=null}),16)})),void y(s+i,(function(){r.off(i),e.wrap.off("click"+i),e.arrowLeft&&a&&e.arrowLeft.add(e.arrowRight).destroyMfpFastClick(),e.arrowRight=e.arrowLeft=null})))},next:function(){e.direction=!0,e.index=H(e.index+1),e.updateItemHTML()},prev:function(){e.direction=!1,e.index=H(e.index-1),e.updateItemHTML()},goTo:function(t){e.direction=t>=e.index,e.index=t,e.updateItemHTML()},preloadNearbyImages:function(){var t,n=e.st.gallery.preload,r=Math.min(n[0],e.items.length),i=Math.min(n[1],e.items.length);for(t=1;t<=(e.direction?i:r);t++)e._preloadItem(e.index+t);for(t=1;t<=(e.direction?r:i);t++)e._preloadItem(e.index-t)},_preloadItem:function(n){if(n=H(n),!e.items[n].preloaded){var r=e.items[n];r.parsed||(r=e.parseEl(n)),x("LazyLoad",r),"image"===r.type&&(r.img=t('').on("load.mfploader",(function(){r.hasSize=!0})).on("error.mfploader",(function(){r.hasSize=!0,r.loadError=!0,x("LazyLoadError",r)})).attr("src",r.src)),r.preloaded=!0}}}});var D="retina";t.magnificPopup.registerModule(D,{options:{replaceSrc:function(t){return t.src.replace(/\.\w+$/,(function(t){return"@2x"+t}))},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var t=e.st.retina,n=t.ratio;(n=isNaN(n)?n():n)>1&&(y("ImageHasSize."+D,(function(t,e){e.img.css({"max-width":e.img[0].naturalWidth/n,width:"100%"})})),y("ElementParse."+D,(function(e,r){r.src=t.replaceSrc(r,n)})))}}}}),function(){var e="ontouchstart"in window,n=function(){b.off("touchmove"+r+" touchend"+r)},r=".mfpFastClick";t.fn.mfpFastClick=function(i){return t(this).each((function(){var o,a,s,c,u,l,f,d=t(this);e&&d.on("touchstart"+r,(function(t){u=!1,f=1,l=t.originalEvent?t.originalEvent.touches[0]:t.touches[0],s=l.clientX,c=l.clientY,b.on("touchmove"+r,(function(t){l=t.originalEvent?t.originalEvent.touches:t.touches,f=l.length,l=l[0],(Math.abs(l.clientX-s)>10||Math.abs(l.clientY-c)>10)&&(u=!0,n())})).on("touchend"+r,(function(t){n(),u||f>1||(o=!0,t.preventDefault(),clearTimeout(a),a=setTimeout((function(){o=!1}),1e3),i())}))})),d.on("click"+r,(function(){o||i()}))}))},t.fn.destroyMfpFastClick=function(){t(this).off("touchstart"+r+" click"+r),e&&b.off("touchmove"+r+" touchend"+r)}}(),k()})?r.apply(e,i):r)||(t.exports=o)},function(t,e){ !function(t,e,n){var r,i="hashchange",o=document,a=t.event.special,s=o.documentMode,c="on"+i in e&&(void 0===s||s>7);function u(t){return"#"+(t=t||location.href).replace(/^[^#]*#?(.*)$/,"$1")}t.fn[i]=function(t){return t?this.bind(i,t):this.trigger(i)},t.fn[i].delay=50,a[i]=t.extend(a[i],{setup:function(){if(c)return!1;t(r.start)},teardown:function(){if(c)return!1;t(r.stop)}}),r=function(){var n,r,a,s={},l=u(),f=function(t){return t},d=f,p=f;function _(){var r=u(),o=p(l);r!==l?(d(l=r,o),t(e).trigger(i)):o!==l&&(location.href=location.href.replace(/#.*/,"")+o),n=setTimeout(_,t.fn[i].delay)}return s.start=function(){n||_()},s.stop=function(){n&&clearTimeout(n),n=void 0},void 0!==t.browser&&t.browser.msie&&!c&&(s.start=function(){r||(a=(a=t.fn[i].src)&&a+u(),r=t('